Ban Ki-moon has urged Britain to stop funding fossil fuel projects overseas, in what he said would mark a test of Theresa May’s commitment to act on climate change.

The former UN secretary general said he was deeply concerned that the UK’s export credit agency had provided billions of pounds in recent years to support businesses involved in oil and gas schemes around the world.

“These figures and policies are hard to reconcile with the UK’s commitments under the Paris agreement,” said Ban, referring to the international climate deal he forged in 2015 as UN chief.

“The time has come for the UK to change course, in the interests of the whole world,” he wrote in a comment piece for the Guardian.

He said the funding was at odds with warning given by Mark Carney, the Bank of England governor, who has said climate change will lead to financial crises.

Ban rarely comments on specific climate change policies of individual countries, and made clear he believed that the UK could continue to be a leader on the issue.

But he said: “The UK now faces a crucial opportunity to live up to the prime minister’s words [on climate action] and prove it is serious about phasing out the use of fossil fuels worldwide, and not only on its own territory.”

The former South Korean diplomat’s comments on UK Export Finance (UKEF), which provides lines of credit and insurance to help companies win business overseas, are the first time he has singled out a country’s credit export agency. “There is now a growing consensus that fossil fuels should not be funded in any way by export finance organisations,” he said.

Ban, who is part of a group of former world leaders known as the Elders, cited the World Bank’s policy on oil and gas financing and the Swedish equivalent of UKEF’s decision to stop funding fossil fuel companies.

Mary Creagh, chair of a committee of MPs investigating the scale and impact of UKEF funding for oil and gas schemes, said: “Mr Ban is right that UKEF’s support for fossil fuel projects overseas is incompatible with the UK’s leading role in the fight against climate change.”

The Environmental Audit Committee said UKEF was estimated to have given £551m of support to fossil fuel production between 2014 and 2016. Between 2010 and 2014, more than 99% of its funding for energy went to fossil fuels, despite a coalition government pledge to stop funding such “dirty” projects.

Labour has said it would redirect UKEF towards low carbon energy projects if it came to power, following the agency’s “overwhelming” support for fossil fuel projects.

More than a tenth of the export credit agency’s budget, £1.5bn, was allocated for the oil and gas sector in 2017. UKEF has increased its exposure to the oil sector, according to its latest annual report, due to opportunities in Asia and South America.

And the agency said it was ready to support more fossil fuel projects overseas. “There is a pipeline of new business in both the oil and gas and petrochemical sectors given the strong credentials of UK exporters in these areas,” it said.

Recent projects supported by the UK include oil and gas fields off the coast of Ghana, a major gas pipeline in Oman and software for an oil firm in Argentina.

A UKEF spokesperson said: “The UK government’s priority, at home and abroad, is to encourage international opportunities for UK businesses – ensuring they can build fruitful relationships with overseas partners and contribute to economic growth around the world.

“We are committed to high standards of environmental, social and human rights risk management.”