A backhoe drives at the site that was going to be the venue for the COP25 UN climate summit at the Cerrillos Bicentennial Park in Santiago, Chile, Wednesday, Oct. 30, 2019. Chilean President Sebastián Pinera cancelled the COP25 and the APEC summits after nearly two weeks of nationwide protests over economic inequality that have left at least 20 dead and damaged businesses and infrastructure around the country. (AP Photo/Esteban Felix)

A backhoe drives at the site that was going to be the venue for the COP25 UN climate summit at the Cerrillos Bicentennial Park in Santiago, Chile, Wednesday, Oct. 30, 2019. Chilean President Sebastián Pinera cancelled the COP25 and the APEC summits after nearly two weeks of nationwide protests over economic inequality that have left at least 20 dead and damaged businesses and infrastructure around the country. (AP Photo/Esteban Felix)

BERLIN (AP) — The United Nations global climate meeting next month will take place in Madrid after previous host Chile canceled at short notice, officials said Friday.

U.N. climate chief Patricia Espinosa said representatives of the body that organizes the annual conference had accepted Spain’s offer to host it in the country’s capital Dec. 2-13.

Chilean President Sebastián Piñera had announced Wednesday that he was cancelling plans to host the meeting, as well as a summit of Asia-Pacific leaders, to focus on restoring security in his country following weeks of protests in which at least a dozen people have died.

ADVERTISEMENT

Spanish Prime Minister Pedro Sánchez’s office offered to step in at short notice Thursday, sending delegates from around the world scrambling to change their travel plans.

Sánchez, who is facing a national election on Nov. 10, celebrated Friday’s decision.

“Excellent news: Madrid will host the global climate meeting from Dec. 2-13. Spain is already at work to guarantee its staging of COP25. Our government firmly keeps its commitment to lasting progress and a just ecological transition,” Sánchez wrote on Twitter.

Among those who were planning to attend the conference in Chile was Swedish activist Greta Thunberg, whose climate protests have helped inspire tens of thousands of mostly young people to take to the streets demanding greater efforts from world leaders.

The teenager made a high-profile crossing from England to New York by sailboat earlier this year and planned to travel overland to Santiago to speak at the meeting. Thunberg refuses to fly because of aviation’s big carbon footprint.

After the move to Madrid was confirmed Friday, Thunberg appealed for help.

“It turns out I’ve traveled half around the world, the wrong way,” she tweeted.

“Now I need to find a way to cross the Atlantic in November...,” she added. “If anyone could help me find transport I would be so grateful.”

Thunberg voiced regret about not being able to visit Central and South America as planned, saying she had been looking forward to doing so.

“But this is of course not about me, my experiences or where I wish to travel. We’re in a climate and ecological emergency,” she said.

It wasn’t immediately clear on what scale the conference will be held in Madrid. Last year’s climate conference in Katowice, Poland, was attended by more than 20,000 people.

The 25th Conference of the Parties, or COP25, is meant to work out some of the remaining unresolved issue on the rules that countries have to follow in their efforts to reduce greenhouse gas emissions.

The meetings have also become a venue for countries to announce new initiatives to respond to global warming.

___

Follow AP’s full coverage of climate change issues at https://www.apnews.com/Climate