A method of treating wastewater wherein the biomass associated with the
wastewater is subjected to simultaneous nitrification and denitrification
in a single reactor. The method entails directing a wastewater influent
stream into the reactor and measuring the concentration of N--NH.sub.4 in
the influent wastewater stream at a point upstream from the reactor. Air
is supplied to the reactor for aerating the biomass in the reactor. The
method includes controlling the quantity of air introduced into the
reactor based in part at least on the measured concentration of
N--NH.sub.4.