China will pay farmers to turn animal waste into fertilizer and power, the Ministry of Agriculture said on Wednesday, as Beijing cracks down on agricultural pollution that has for years leaked into rivers and lakes, angering Chinese residents.

China will give farmers subsidies to build animal waste processing facilities to make fertilizers or to treat manure so it's safe for disposal, and to install biogas plants that use methane to generate electricity, according a government plan announced on Aug. 1.

The plan includes setting up recycling programs by 2020 in 200 major counties that have livestock farms. That's less than half the 586 major counties the government says have hog and poultry farms.