Biological treatments have become insufficient to treat municipal wastewater with greater toxicity and excess nitrogen and phosphate species, thus affecting the organisms that consume the water. In this work, a process was implemented for the removal of nutrients through three stages: stage A, complete aeration (24 h, 43 months); stage B, decreased aeration (12 h, 17 months); and stage C, decreased aeration with biocalcium (12 h, 19 months). The addition of biocalcium from eggshell promoted the formation of flocks, which resulted in the removal of nitrites (61 %), nitrates (84 %), total nitrogen (57 %), total phosphorus (8.3 %), sedimentable solids (50 %), total suspended solids (69 %), BOD5 (76 %), helminth eggs (50 %) and fecal coliforms (54 %). The statistical analyses in the three stages indicated that there is a strong correlation between the concentration of fats and oils and the removal of sedimentable solids and total suspended solids, since these parameters were correlated by 97 and 89 %, respectively. Sedimentable solids were correlated with total suspended solids by 94 %, while nitrates and total nitrogen were correlated 92 %, which favors the removal of nutrients in wastewater. The increase in the concentration of nitrogen in the sludge in stage C generated a C:N ratio of 7.98. This ratio shows that the sludge is feasible for use as a mediator of soils and a biofertilizer because of the high contents of calcium, phosphorus and nitrogen. In addition, biocalcium promoted the precipitation of hydroxyapatite, struvite, calcite and quartz. In general, the three stages of the treatment contributed to the stabilization of the wastewater treatment plant (WWTP) in an efficient, economical, and safe way.