SAN FRANCISCO -- Apple is cleaning up its manufacturing operations in China to reduce the air pollution caused by the factories that have assembled hundreds of millions of iPhones and iPads during the past eight years.

The world's most valuable company is working with its Chinese suppliers to eventually produce 2.2 gigawatts of solar power and other renewable energy.

The commitment announced Wednesday represents Apple's latest attempt to prevent the popularity of its devices and digital services from increasing the carbon emissions that are widely believed to changing the Earth's climate.

Apple Inc. estimates 20 million metric tons of greenhouse gas pollution will be avoided as more of its suppliers rely on renewable energy between now and 2020. That's like having four million fewer cars on the road for a year.

Panels capable of generating about 200 megawatts of solar power will be financed by Apple in the northern, southern and eastern regions of China, where many of its suppliers are located. The Cupertino, California, company is teaming up with its Chinese suppliers to build the capacity for the remaining 2 gigawatts of renewable energy, which will be a mix of solar, wind and hydroelectric power.

Foxconn, which runs the factory where the most iPhones are assembled, is pledging to contribute 400 megawatts of solar power as part of the 2-gigabyte commitment. The solar panels to be built by 2018 in China's Henan Province are supposed to produce as much renewable energy as Foxconn's Zhengzhou factory consumes while making iPhones.

Apple has made protecting the environment a higher priority since Tim Cook replaced the late Steve Jobs as the company's CEO four years ago.

"Climate change is one of the great challenges of our time, and the time for action is now," Cook said in a statement. "The transition to a new green economy requires innovation, ambition and purpose."

Apple just completed projects in China that generate 40 megawatts of solar energy to offset the power required by its 24 stores and 19 offices in the country. All of Apple's data centres, offices and stores in the U.S. already have been running on renewable energy.

"When you look at all the air pollution in China, all the manufacturing that is done there has a lot to do with it, so this is a significant step in the right direction," said Gary Cook, a senior analyst for Greenpeace, a group devoted to protecting the environment.

Apple also has a financial incentive to help make China a better place to live. The greater China region is Apple's second biggest market behind the U.S. Tim Cook has made it clear that he wants the company to make even more inroads as rising incomes enable more of China's population to buy smartphones and other gadgets.

Google, Facebook and other technology companies also have been investing heavily in renewable energy in an effort to cut the pollution caused by power needed to run the data centres that process and store information for the users of the digital services.

By some estimates, technology products and services account for as much of the world's carbon emissions as the airline industry.

Apple can easily afford to go green. The company had $203 billion in cash at the end of June.