The United States formally exited the Paris Agreement on Wednesday, fulfilling an old promise by President Donald Trump to withdraw the world's second-largest greenhouse gas emitter from the global pact to fight climate change.

But the outcome of the tight U.S. election contest will determine for how long. Trump's Democratic rival, Joe Biden, has promised to rejoin the agreement if elected.

"The U.S. withdrawal will leave a gap in our regime, and the global efforts to achieve the goals and ambitions of the Paris Agreement," Patricia Espinosa, executive secretary of the U.N. Framework Convention on Climate Change (UNFCCC), told Reuters.