TECHNOLOGY FOCUS - ENVIRONMENT - Preferred Method: The mixed liquor within the activated sludge tank is subjected to an aerobic environment, followed by an anoxic environment and/or an aerobic environment. The phosphate solids are separated from the sludge stream by mechanical means based upon differential settling velocity. They are separated from the sludge stream by a gravity separator, a hydrocyclone, and/or a centrifuge. Separating and removing the phosphate solids from the sludge steam occurs without removal of organic matter having a specific gravity less than that of the phosphate solids. The source of multivalent metal ions added in stoichiometric excess. The method comprises adding an additional source of ammonia to the sludge stream in the sidestream reactor. The sludge stream is mixed for 20 minutes-2 hours to precipitate phosphate solids. A portion(s) of the separated phosphate compounds are recycled back to the sidestream reactor to seed the sludge stream. Passing the sludge stream through solids separation module removes from the sludge stream suspended inert organic and inorganic particles, without removal of biological solids larger in size than at least some of the removed inert particles. The same mechanical separator is used to separate inert solids and phosphate solids from the sludge stream. The sludge stream is passed through a screen(s) to remove large inorganic and organic particles before processing in the bioreactor. A first separator and a second separator arranged in series are used to separate phosphate solids from the sludge stream. The first separator divides the sludge stream into an overflow and an underflow comprising phosphate solids; and the underflow is then diluted with water and passed through the second separator where phosphate solids are separated from the underflow. The method comprises combining the sludge stream from which the phosphate solids have been removed with the wastewater in the anaerobic tank, or with the mixed liquor in the activated sludge tank. The sludge stream is combined with the mixed liquor in an oxygen-deficient zone within the activated sludge tank to form denitrified liquor, which is recycled to the anaerobic tank for mixing with the wastewater.Preferred Parameter: The sludge stream in the sidestream reactor has a pH of 8-10, preferably 8.5-9.5.    TECHNOLOGY FOCUS - INORGANIC CHEMISTRY - Preferred Material: The multivalent metal ions are magnesium (Mg2+) or calcium (Ca2+). The source of multivalent metal ions is magnesium chloride (MgCl2), magnesium bicarbonate (MgHCO3), magnesium oxide (MgO), magnesium sulfate (MgSO4), or magnesium dihydroxide (Mg(OH)2). The phosphate solids are from calcium phosphate, or preferably struvite.    TECHNOLOGY FOCUS - MECHANICAL ENGINEERING - Preferred Component: The bioreactor comprises a facultative sequencing digester. The solids separation module comprises a screen; and/or a mechanical separator consisting gravity separator, hydrocyclone, or centrifuge.