A process for producing a phosphorus product from wastewater, the process comprising: a) treating wastewater with the following treatment steps so as to produce phosphate-containing wastewater that has been treated to remove biomass and other impurities, not including dissolved phosphates: treating the wastewater with an initial treatment step producing a solid waste and an initially treated water; treating the initially treated wastewater with a mechanical treatment step producing a mechanical sludge and a mechanically treated wastewater; treating the mechanically treated wastewater with a biological treatment step producing a biological sludge and a biologically treated wastewater; b) creating phosphate-containing flocs from the biologically treated wastewater using at least one metal salt selected from the group of iron salts, whereby the main reaction of step b) will result in the formation of iron phosphate, where after the iron phosphate-containing flocs are separated from the remaining treated wastewater by using a physical separation step, c) adding an alkali metal hydroxide selected from the group consisting of sodium hydroxide and potassium hydroxide, to the iron phosphate-containing flocs in an amount effective to react said iron into iron hydroxide, thus providing iron hydroxide and an alkali metal phosphate, d) separating the iron hydroxide from the formed alkali metal phosphate of step c), and e) obtaining the phosphorus product in a form of a liquid alkali metal phosphate salt, wherein the liquid alkali metal phosphate salt obtained in step e) is crystallized as Na 3 PO 4 . nH 2 O crystals from a Na 3 PO 4 liquid, or an aqueous K 3 PO 4 liquid obtained in step e) is subjected to evaporation to obtain a pure K 3 PO 4 liquid. a) treating wastewater with the following treatment steps so as to produce phosphate-containing wastewater that has been treated to remove biomass and other impurities, not including dissolved phosphates: treating the wastewater with an initial treatment step producing a solid waste and an initially treated water; treating the initially treated wastewater with a mechanical treatment step producing a mechanical sludge and a mechanically treated wastewater; treating the mechanically treated wastewater with a biological treatment step producing a biological sludge and a biologically treated wastewater; b) creating phosphate-containing flocs from the biologically treated wastewater using at least one metal salt selected from the group of iron salts, whereby the main reaction of step b) will result in the formation of iron phosphate, where after the iron phosphate-containing flocs are separated from the remaining treated wastewater by using a physical separation step, c) adding an alkali metal hydroxide selected from the group consisting of sodium hydroxide and potassium hydroxide, to the iron phosphate-containing flocs in an amount effective to react said iron into iron hydroxide, thus providing iron hydroxide and an alkali metal phosphate, d) separating the iron hydroxide from the formed alkali metal phosphate of step c), and e) obtaining the phosphorus product in a form of a liquid alkali metal phosphate salt, <EOS>