A system and methods for controlling microbial activity and growth in a mixed phase system. The method includes providing a rare-earth compound. The method also includes injecting the rare-earth compound into a mixed phase system, wherein the rare earth compound binds with a phosphate in an aqueous phase to adsorb the phosphate. The method also includes separating the rare-earth compound from the mixed phase system.