Donald Trump should stand "on the right side of history" by reconsidering the decision to pull the US out of the Paris climate change accord, former United Nations Secretary-General has said.
Mr Ban said: "If the US withdraws, this has a much bigger political impact. I'm afraid that any leadership vacuum could be filled by others, and this is not what we want to see.
He called the choice made by the US President "misguided" and said that it responded to "a short-term vision".
He also called on the public to raise its voice and said commitment to the agreement from governors, mayors, business leaders and civil society in the US was "very encouraging".
For almost a decade, Mr Ban spearheaded negotiations to combat climate change that eventually led to the pledge to keep global temperatures from raising another degree Celsius by 2100.
Nearly 200 countries, including the US, signed the agreement in December 2015.
"I sincerely hope that President Trump stands on the right side of history," Mr Ban said in Madrid.
As the world's largest economy, the United States is also the planet's number one polluter, accounting for 14% of global emissions.
"The decision has implications and effects politically and psychologically much larger than 14%, because smaller countries have traditionally followed Washington's leadership," said Mr Ban, calling on the US leader to show "global vision".
Mr Ban joined more than 50 former world leaders who criticised the current US administration's view on climate change and warned of "unpredictable and possibly regrettable" consequences.
They also called on other signatories of the Paris agreement to "show greater urgency and commitment in the fight against global warming".
The leaders represented about half of the members of the Club de Madrid alliance, which Mr Ban joined recently as an honorary member.
Among the signatories were former Chilean president and former UN envoy for climate change Ricardo Lagos, Nobel Peace Prize winner and former East Timor leader Jose Manuel Ramos-Horta and former New Zealand prime minister Helen Clark, who also headed the UN's development agency.
Mr Ban also referred to the situation in the Korean Peninsula as "very worrisome" following Pyongyang's continuing weapons launches, against UN Security Council resolutions, including recent anti-ship missiles.
The former South Korean foreign minister said the testing of ballistic technology is putting Kim Jong Un's regime "on the verge" of being able to develop a nuclear-tipped long-range missile.
"Never before since the Korean War has the level of tension been so high," Mr Ban said, calling on North Korea "to stop all provocations" in order for the international community to restart a dialogue.
He also said that the leaders of the US and South Korea should devise solutions to reduce the tension in the Korean Peninsula during a summit in Washington in late June.