Wastewater contains phosphate in particulate and dissolved form. By adding ferric or aluminum, the phosphate can be precipitated as Fe- or Al- phosphate. The phosphate precipitation is accompanied by the precipitation of the not readily soluble hydroxide and the adsorption of phosphate to the surfaces of the solid hydroxide.