NOVELTY - Purification of exhaust gas in a composting process, and for heat recovery, comprises leading exhaust gas to a washing process divided into two parts. In the first part (3), the heat of the exhaust gas is recovered from circulating wash water, when the condensing excess water is brought into the circulating wash water, and the anhydrous ammonia in the second part (4) is bound by reducing the pH level of the circulating water of the second part to the 1-3, in which case the anhydrous ammonia is bound to the second circulating wash water.    USE - Purification of exhaust gas in a composting process and for heat recovery, by washing.    ADVANTAGE - Waste water that has condensed from the washing process, which is divided into two parts, can be either led to a sewer or returned to the finished compost, if desired. The use of lye (used in prior art to neutralize water to be removed as it has a low pH value due to the removal of the anhydrous ammonia) is eliminated. Nitrogen released along with the compost gas can be returned to the compost as a nutrient.    DETAILED DESCRIPTION - Purification of exhaust gas in a composting process, and for heat recovery, comprises leading the exhaust gas to a washing process, in which, in order to bind the anhydrous ammonia, the pH value of the was water circulating in the washing process is reduced to 1-3. In the washing process (3,4), the heat of the exhaust gas is recovered from the circulating wash water, so that the water condenses from the exhaust gas into the wash water, and the condensing water is removed from the circulating wash water. The washing process is divided into two parts. In the first part (3), the heat of the exhaust gas is recovered from the circulating wash water, when the condensing excess water is brought into the circulating wash water, and the anhydrous ammonia in the second part (4) is bound by reducing the pH level of the circulating water of the second part to the level above, in which case the anhydrous ammonia is bound to the second circulating wash water.    DESCRIPTION OF DRAWING(S) - The figure shows two composting tunnels used in the purification of exhaust gas.    Lower and upper washing processes (3,4)    Side flow (9)    Heat exchanger (15)