The primary effluent is passed into large aeration tanks where it is constantly agitated mechanically , air is pumped into it,allows vigorous growth of useful aerobic microbes into flocs,microbes consume the major part of the organic matter in the effluent significantly reducing the BOD (biochemical oxygen demand) of the effluent , the effluent is then passed into a settling tank where the bacterial ‘flocs’ are allowed to sediment (This sediment is called activated sludge) , a small part of the activated sludge is pumped back into the aeration tank to serve as the inoculum , the remaining major part of the sludge is pumped into large tanks called anaerobic sludge digesters. (Here, other kinds of bacteria , which grow anaerobically, digest the bacteria and the fungi in the sludge.) During this digestion, bacteria produce a mixture of gases such as methane, hydrogen sulphide and carbon dioxide. (These gases form biogas and can be used as source of energy as it is inflammable.) (The effluent from the secondary treatment plant is generally released into natural water bodies)