The removal of ammonia nitrogen and phosphorus from wastewater by precipitating out with magnesium sails was showed. Factors of pH, reaction time, N/P ratio, and dissolution test were investigated to find optimal conditions for magnesium ammonium phosphate (MAP) formation. The investigated conditions were also applied to toxic industrial wastewater. SEM and EDS analyses indicated that the precipitate was magnesium ammonium phosphate that was fine crystals of Mg and P compounds. The removal of ammonia and phosphorus increased with pH up to 10.5 where 82.6% and 97% of ammonia nitrogen and phosphorus were removed. It was found that minimum 10 minutes reaction was required for the nutrients removal. However, a small amount of phosphorus dissolved after 60 minutes. Ammonia nitrogen was well removed at one mole to two moles of magnesium. But at doses higher than two moles of magnesium, ammonia nitrogen increased due probably to the decreased pH. Bittern and sea water proved to be excellent coagulants for nutrient removal from industrial wastewater. The comparative study of different magnesium sources showed that bittern was the most efficient as 72% 99% of ammonia and phosphorus, respectively, were removed.