With 10 days left until the COP25, Spain is working at breakneck speed to pull off the logistical "miracle" of organising the world's top climate summit in just a few short weeks.
A vast event which runs from December 2-13, the UN climate summit had been due to take place in Chile until its crisis-hit government pulled out on October 30 following a wave of deadly civil unrest.
Within days, the venue was switched to Madrid after Spain's Socialist Prime Minister Pedro Sanchez offered to play host, hailing the acceptance of his offer as "excellent news".
But it has left the Spanish capital barely a month to pull off a major international summit with 25,000 delegates from 200 countries.
Those attending were also caught out by the change, with Swedish teen activist Greta Thunberg -- who refuses to fly because of the carbon emissions -- having to radically re-think her travel plans.
Having already made it halfway from Sweden to Chile by train, boat and electric car, she quickly sought help to hitch a ride back to Europe -- and is currently crossing the Atlantic by catamaran.
Under pressure, the Spanish government has unblocked resources to cover the cost of playing host -- an estimated 60 million euros ($66 million) -- while Madrid officials have been at pains to stress the city's capacity to host such an event.
"Madrid is in a position -- and in record time -- to be the centre of the world," enthused Mayor Jose Luis Martinez Almeida, saying the city had all the public services and infrastructure needed "to host large international events".
- Weeks for a year-long job -
The summit, which seeks to boost commitments to fight climate change, will be held in the IFEMA exhibition centre in northeastern Madrid. The venue hosts the FITUR international tourism fair which, with 250,000 participants, is one of the world's largest.
Organising an event like the COP25 would normally take between six months and a year, an IFEMA spokeswoman said, while indicating that preparations were moving "at breakneck speed" and would "be finished in time".
The Madrid hotels association, the AEHM, said it was "very well prepared" in terms of beds, while city hall said that within the space of less than a week, it had signed up more than 2,000 volunteers.
"This COP is a miracle," a diplomatic source told AFP.
"It is extraordinary that a country would propose hosting, and be capable of organising, such an event like this so quickly."
Environment Minister Teresa Ribera said on Thursday Spain "would be able to put on all the events" but that credit should be given to Santiago for its meticulous preparation, indicating Chile would still be chairing the summit.
With much work still to be done, officials in both government and the town hall are working around the clock, although the interior ministry has yet to decide on policing numbers in a country where the national terrorism alert level is currently at its second-highest level.
- A costly blow -
The biggest impact of changing venue will be the drop in delegate numbers from certain areas, the diplomatic source said, "above all, NGOs from the southern hemisphere and civil society groups from the poorest countries who don't have the resources to travel".
"You can only assume that many people who were going, now won't be able to," said Tatiana Nuno of Greenpeace Spain of NGOs that had already booked tickets to Chile and hotels there who wouldn't be able to absorb the added costs of switching venues.
These organisations "are fundamental for pushing governments to take urgent measures" and ensuring that "the Paris Accord is carried out", she said, referring to the landmark climate pact.
And Harjeet Singh of ActionAid International warned that the absence of negotiators from Africa, from less developed countries or from small island states "could have real and lasting consequences for the world’s vulnerable people."
But on the positive side, shifting the UN summit to Madrid would mean it had a smaller environmental impact than if it had been held in Chile, Nuno said.
Environmental ministry calculations suggest the event would generate some 65,000 tonnes of CO2.