Beijing is banning the use of coal by 2020 in an effort to help their air pollution situation.

The air in the country's capital, among surrounding areas in northeast China, is filled with smog, reports The Sydney Morning Herald.

All of the affected areas will stop using coal and coal-based products. There are also plans to shut down all coal plants.

The city will begin to prioritize electricity and natural gas for heating, according to the Beijing Municipal Environmental Protection Bureau.

Official statistics show that coal made up one-quarter of the city's total energy consumption in 2012. Other major contributors to the area's pollution include industrial production, vehicles and general dust.

However, while Beijing is banning coal, the rest of the country is expected to increase its use of coal, according to reports from The Hill. The coal will emit more greenhouse gases in the air, keeping China as the country with the most greenhouse gases in the air.

The ban is following pressures from the public to clean up the pollution in the air. Environmental protection was recently listed by China's central government as one of the top criteria by which leaders will be judged, according to the AP.

The smog in China has been recorded as a factor in the high rates of lung cancer in the country.

Fuel oil, petroleum coke, combustible waste and some biomass fuels will also be prohibited as part of the effort to fight pollution, Xinhua news agency said Monday.