It was an agreement born from a fear of failure, delivered by the smoothness of French diplomacy.
Six years earlier, countries had bitterly walked away from global climate talks in Copenhagen without a deal. The decision to reassemble in Paris to try again at getting almost 200 countries to sign a pact on cutting carbon emissions was a gamble: another collapse could the end world's ability to forge a common approach to dealing with climate change.
And no political leader wanted his reputation stained by a repeat of the debacle in Copenhagen.
So there was no detail of hospitality too small for the French hosts this time, no country negotiator who would go unflattered by Laurent Fabius, the French foreign minister who presided over the conference.
Fabius had been the youngest French prime minister in history in the 1980s; now he was an elder statesman looking to carve a bigger place in it. Over two weeks under the global spotlight, his sonorous voice and relentless optimism would come to define the public tone of the proceedings.
But behind the scenes, the talks witnessed the confrontations and five-past-midnight compromises to be expected when sleep-deprived negotiators from almost every country in the world are supposed to come to a consensus.
They ultimately found it, remarkably only one day later than planned. But the path to the standing ovations at the end was strewn with disputes over money, the emergence of an effective new climate coalition of states, and hours of wrangling over what "should" or "shall" be done.
For the survivors of Copenhagen, the key to success in Paris would be preparation.
UN Secretary General Ban Ki-moon complained that the political leaders had not been well-prepared for the Copenhagen meeting, and this time he and the French conducted extensive advance work to get other leaders personally engaged.
They also decided that, if leaders were to come to Paris, they would do so at the beginning to lend the talks some political oxygen, rather than arriving for a scramble at the end.
So on November 30, the sprawling conference hall near the Le Bourget airfield on the outskirts of Paris hosted world leaders, who were supposed to deliver three minutes of encouragement. Fabius wandered the conference centre before they arrived, tapping microphones and checking the video monitors under a podium made of recycled wood.
"Ah, we have Prince Charles," he said to an aide, consulting the speakers' list.
The opening day speeches were seen as a success. UN officials were relieved at the relatively cooperative tone from Russian President Vladimir Putin who was among several leaders who assured Ban privately before the outset that Russia would not block a deal, UN officials said later.
Fabius pulled together a team of officials and diplomats from across the French civil service to facilitate the talks. "He treated it less like a climate negotiation and more like a trade deal," said one UN veteran of past climate talks.
He also constantly praised delegates for their hard work and insights, before telling them exactly what schedule of debate they had to follow to finish by their self-imposed deadline of Friday, December 11.
He gave the job of writing the accord's preamble to Venezuela's minister Claudia Salerno, whose country had been perhaps the harshest critic of the Copenhagen process that was seen as a collusion of big powers dictating to small countries, making her personally vested in finding compromises.
Not all developing countries were easily won over, however. A central sticking point throughout the talks was the degree to which the agreement would be legally binding on countries, especially the rich ones who are expected to provide the hundreds of billions of dollars in funding to cover the transition to a low carbon future.
The differences were expressed in wrangles over wording. Hard, legally binding commitments were proceeded in the text as items that countries "shall" do.
Those items that were simply good intentions fell into the "should" do category.
HALF A DEGREE CLOSER
Facing unbudging demands to put their financial commitments into legal language, US negotiators knew they had to break the poor vs. rich country divide. Their tactic was to sign up to a loose coalition of countries called the High Ambition Coalition.
The European Union takes credit for starting the group as far back as 2011, when it was a loose alliance between the EU and small island states.
As Paris approached, it expanded to include African, Caribbean and Pacific nations, developing an agenda that included the goal of keeping the global temperature rise to 1.5 degrees Celsius (2.7 Fahrenheit) over pre-industrial levels by the end of the 21st century.
The number had almost been banished from serious discussion ahead of Paris. But the American decision to "join" the High Ambition Coalition brought the 1.5 goal back into play, sweetened with pledges of hundreds of millions of dollars to help island and developing states mitigate the ill-effects of climate change.
Although the promise is only aspirational, the re-emergence of references to 1.5 degrees in the Paris text brought several influential developing countries into the US camp. Soon Canada joined, then Australia and Brazil, a collection of wealthy, heavy-polluting western countries marching into the plenary hall alongside the Marshall Islands.
China's negotiators dismissed the High Ambition Coalition as a stunt. "This is a kind of performance by some members," said Liu Zhenmin, deputy head of the China delegation. But the solidarity of the developing nation bloc was broken.
LAST BRIDGES AND HICCUPS
Climate change summits have developed a particular theatre of their own. In one moment, it was possible to see actor Alec Baldwin expressing his fears for the planet to journalists, across from an Indonesian pavilion hosting a party to show off its pilot green energy hospitals.
But much of the real work was done by people not even at Le Bourget. After visiting at the start, US President Barack Obama and Chinese President Xi Jinping discussed roadblocks by telephone, and the two countries appeared to be mostly on the same page.
Other housekeeping of the text was taken care of. Negotiators insured that a specific reference to climate effects on "occupied territories" was taken out to keep the politics focused on climate issues.
By Saturday, Fabius the pieces were falling into place. "I think we're done here," said a happy Marshall Islands foreign minister Tony de Brum on Saturday morning.
There was to be one last hiccup. The final text had settled on 143 items prefaced by "shall," 40 with "should." But in one section, the words appeared to have been flipped.
Suddenly, there was a delay in the hall where delegates had convened amid smiles and air kisses to seal the deal.
Fabius and US Secretary of State John Kerry left the room, replaced by rumours of trouble. But then the French minister was back. A technical glitch, he explained, brought on by the fatigue of a drafter.
The organizers announced corrections to a few typographical errors, and tellingly switched one last "should" for a "shall" before Fabius swiftly brought the gavel down.