The present invention relates to methods of metabolic engineering cells to increase their ability to compete with contaminating microorganisms without the need for antibiotics. More particularly, the invention provides methods to engineer cyanobacteria to utilize melamine as nitrogen source, phosphite as phosphorous source, optionally also utilizing NADP<+> over NAD<+>, and also provides genetically engineered cyanobacteria made using such methods. In a particular embodiment, the genetically engineered cells are cyanobacterium transformed by at least one polynucleotide molecule comprising heterologous melamine utilization pathway genes, atzD, trzE, DUR1,2, trzC, guaD and triA operably linked to at least one promoter and / or comprising a further phosphite dehydrogenase (ptxD ) gene.