NOVELTY - Removing phosphates from wastewater containing phosphates during a multi-phase digestion, comprises: feeding at least one of a primary sludge or a waste activated sludge into an organic acid digester to provide an organic acid digest; raising the pH of the organic acid digest to a pH of less than 8; removing the precipitated phosphates from the organic acid digest; and returning the organic acid digest to the organic acid digester or sending the organic digest into a thermophilic digester or a mesophilic digester, where the organic digest undergoes methanogenesis to produce methane.    USE - The process is useful for removing phosphates from wastewater (claimed) in sewage treatment plant for the production of biosolids and biogas.    ADVANTAGE - The process enhances the methane production in the thermophilic phase and produces biosolids with reduced pathogen content by optimizing environmental conditions for the several microbial processes, and produces low molecular weight organic acids from digestible carbohydrates at mesophilic temperatures by processes of acidogenesis and acetogenesis with a retention time.    DETAILED DESCRIPTION - Removing phosphates from wastewater containing phosphates during a multi-phase digestion, comprises: feeding at least one of a primary sludge or a waste activated sludge into an organic acid digester, where digestible carbohydrates in the sludge undergo acidogenesis and acetogenesis to provide an organic acid digest; raising the pH of the organic acid digest to a pH of less than 8, where phosphates are precipitated from the organic acid digest; removing the precipitated phosphates from the organic acid digest; and returning the organic acid digest to the organic acid digester or sending the organic digest into a thermophilic digester or a mesophilic digester, where the organic digest undergoes methanogenesis to produce methane; such that the removal of the precipitated phosphates from the organic acid digest occurs after the organic acid digest has undergone acidogenesis and acetogenesis but before the organic acid digest undergoes methanogenesis. An INDEPENDENT CLAIM is included for a process for removing phosphates from wastewater containing solubilized phosphates, comprising: raising the pH of the wastewater to a pH of less than 8 by adding a chemical consisting of calcite, dolomite, magnetite and their oxides or hydroxides to the wastewater; and removing the precipitated phosphates from the wastewater.