Ammonium can have toxic effort on aquatic organism. Nitrification also takes places in bodies of water, which leads to oxygen depletion. Furthermore, nitrate and ammonium are eutophying (fertilizing) nutrients that can impair water bodies. For these reasons, nitrification and, in many cases, nitrogen removal is necessary. 
Two special steps are required for nitrogen removal: 
a) Nitrification: Oxidation of ammonium nitrogen and organically bound nitrogen to nitrate. Nitrification is very sensitive to inhibitors and can lead to a pH value in poorly buffered water. 
Nitrification takes places in following steps:
this results in: 
Nitrification is associated with the production of acid (H+). This puts a strain on the buffering capacity of the water or a pH value shift may occur, which impairs the process.
b) Denitrification: Reduction of nitrate nitrogen to molecular nitrogen, which escapes from the wastewater into the atmosphere. This step can be carried out by microorganism commonly found in sewage treatment plants. However, these only use the nitrate as an electron acceptor if no dissolved oxygen is present. 
In order for denitrification to take place in the activated sludge process, an electron source, a reductant, must therefore also be present that can reduce sufficient nitrate to N2. If there is too little substrate in the raw wastewater, this can be added artificially. In addition, denitrification corrects the change in H+ concentration (pH value shift) that occurs during nitrification. This is particularly important for poorly buffered water.
Nitrification and denitrification are in considerable contradiction with regard to the required environmental conditions. Nitrification requires oxygen and CO2. Denitrification only takes place in the absence of dissolved oxygen and with a sufficient supply of oxidizable substances.