Image copyright Getty Images

Just a day after the President of Chile said his country could no longer hold the world's annual climate conference, Spain has offered to host it in Madrid.

The critical meeting, called COP25, was due to take place in Santiago for two weeks from 3 December.

Chilean President Sebastián Piñera said his government needed "to prioritise re-establishing public order" after serious anti-government protests.

Spain's offer will be considered by the UN's climate body next week.

The Spanish government said it considered multilateral action on climate change to be a priority for the UN.

The annual Conference of the Parties (COP) is usually an important moment for taking stock of where the world stands on climate change.

For a quarter of a century, negotiators from almost 200 countries have gathered to try to advance a global strategy for tackling rising temperatures.

However, COP25 has become a problem with country after country finding reasons not to host.

COP25 was originally supposed to be held in Brazil. But in November last year, just two months after being announced as the summit's host nation, then President-elect Jair Bolsonaro pulled out.

Chile cancels global climate summit amid unrest

The far-right leader said this was due to the change of government and budget restrictions, according to local media.

However, he had recently chosen a foreign minister who claimed "climate alarmism" was just a plot by "cultural Marxists".

A month later, Chile was selected to host the climate conference instead. Costa Rica, the other frontrunner, withdrew because of the costs involved in hosting.

With tens of thousands of delegates making plans to travel to Chile for the meeting, the abrupt cancellation on Wednesday by President Piñera was a real shock.

Citing the need for public safety, he withdrew his country's offer to host both the COP and the Apec meeting, where President Trump and China's President Xi Jinping were due to meet.

Many involved in climate negotiations presumed that the meeting would take place in Bonn, Germany, home to the UNFCCC secretariat, at some point in the near future.

Now, according to a statement from acting Prime Minister Pedro Sanchez, Spain has volunteered Madrid as an alternative location. The Chileans have accepted and are recommending it to the UN.

It seems that Chile will still hold the presidency of the COP but it will simply be held in Spain, if the UNFCCC agrees.

There is a precedent for this approach, with the 2017 COP23 held in Bonn, but it was presided over by Fiji.

Around 25,000 people are expected to attend the summit.

One of the most celebrated is Greta Thunberg who had crossed the ocean by yacht in order to travel to Chile in the most low-carbon manner.

She is now in Los Angeles - it remains to be seen if she will be able to get to Madrid on time if the Spanish capital is accepted as the new home of COP25.

Dr Kat Kramer, Christian Aid's global climate lead, said: "It's a shame that COP25 won't be held in Latin America to highlight some of the grave climate impacts that affect the region.

"But hopefully a Madrid summit will be able to keep those in mind. Credit should be given to the Spanish government for offering to help at such short notice considering these often take more than a year to organise.

"But it shows how important countries view the UN process for tackling climate change that they are prepared to do all they can to keep the talks on track."

Follow Matt on Twitter.