Apple and its biggest supplier Foxconn are together pledging to build solar power plants to produce more than 600 megawatts of electricity, in a big step towards making the Chinese factories that produce the iPhone run entirely on clean energy.

As part of a new Apple initiative, Taiwan-based Foxconn — the world’s largest contract manufacturer — has committed to building solar capacity of 400MW in China’s Henan province by 2018.

“Foxconn has committed to generate as much clean energy as its Zhengzhou factory consumes in final production of iPhone,” Apple said.

At the same time, Apple said it would build 200MW of solar projects, spread across China, to offset the carbon produced by its supply chain in the region, where much of the electricity is produced from coal.

Climate change is one of the great challenges of our time, and the time for action is now,” said Tim Cook, Apple’s chief executive, on Wednesday. “We believe passionately in leaving the world better than we found it and hope that many other suppliers, partners and other companies join us in this important effort.”

Apple said its Chinese operations were now carbon-neutral after the completion of a 40MW solar project in Sichuan province, and that altogether its plans would by 2020 offset the equivalent of 4m passenger vehicles a year.

Terry Gou, founder and chief executive of Foxconn, said the two companies “share a vision for driving sustainability”.

“I hope that this renewable energy project will serve as a catalyst for continued efforts to promote a greener ecosystem in our industry and beyond,” he said.

Greenpeace, the environmental campaigner, welcomed the supply-chain initiative and called on other technology companies to follow suit.

“We need governments and companies to transition us to renewable energy as rapidly as possible, and Apple’s announcement today is a major step forward in building a renewably powered supply chain for its products,” said Gary Cook, Greenpeace’s top IT analyst in the US.

We “hope that Samsung, Microsoft and other IT companies will follow their lead in manufacturing their cutting-edge devices with a 21st-century energy supply”, he said.

Apple’s chief executive has been aggressive about using the company’s scale and resources to tackle climate change. Earlier this year, it struck a $850m deal with First Solar, a US solar farm developer, to supply clean electricity to its California headquarters, retail stores and a data centre over 25 years.

At a shareholders’ meeting last year, Mr Cook told an investor who questioned the economic rationale behind such investments that if they only considered financial returns, they should “get out of the stock”.

Nonetheless, Mr Cook also said the First Solar deal should create “very significant savings”, in part thanks to US tax credits for green initiatives.