The most frequently used technique to process the surplus of nitrogen in (the liquid fraction of) pig and cattle slurry or digestate is biological nitrogen removal.
This is a system in which the bacteria in active sludge use oxygen to convert the ammonium in the manure to nitrate (nitrification). In low oxygen conditions they will convert the nitrate into (harmless) nitrogen gas (denitrification) that is released into the air as an inert gas.
After the treatment, the active sludge is separated from the liquid fraction (the effluent) by sedimentation. Part of the sludge can be reused in the tank in order to maintain sufficient bacteria for the biological process. The majority of sludge taken out and is used as organic fertilizer.