Copper One of the techniques used for the stabilization of sewage sludge is anaerobic digestion. The effluent from anaerobic digesters usually requires further treatment since they contain high concentrations of N and P as a result of volatile solids destruction. In this study, a control was developed over the nutrient ions within the anaerobic digester by using substrate with high concentration of Mg2+ ion. The amount of Mg2+ ion added was determined based on the release rate of N and composition of magnesium ammonium phosphate. The results showed 50% removal of NH4+ and PO43- can be achieved without compromising the performance of the reactor in COD and VSS removal and biogas formation.