It was early evening on Saturday, the final day of the COP21 Paris conference. We'd been expecting an official announcement for hours. Delegates milled around in confusion and exhaustion. Many hadn't slept properly for days.
Rumours started to spread about a last-minute problem with the agreement text. Were crucial eleventh hour negotiations going on? Was the whole thing about to fall apart?
For me, the conference gave a window into the secretive world of the climate negotiators and returned me to my first passion, the science of climate change.
I worked on statistical modelling of storms twenty years ago and designed experiments to simulate climate change. It was an iterative process that evolved in steps. I made small changes in my methods as I learnt about what worked and what didn't. We'll come back to that word iterative because, strangely, there was a similarity between this work and what happened at COP21 in Paris.
My colleagues and I gathered in a plywood cubicle, in a hastily convened, off the record briefing somewhere in the maze of the conference centre. "The text of the agreement will go through several more iterations between now and Friday," explained the negotiator, a likeable and good-humoured man.
I'd hardly heard the word iteration since my science work and pricked up my ears. The plan was for groups working under facilitators to take away pieces of the text and hopefully return with compromises. Engagement was high among all countries, he said happily.
But the negotiations went on behind closed doors, often at night. The secrecy was like a magnet to me. Was there shouting, pleading? Or was it orderly and calm?
I got a behind-the-scenes insight from Nick Mabey, a former facilitator under Tony Blair's government. He led groups of negotiators at Kyoto and explained the game theory behind the event. If you put any group of people in a room with a disputed text, he said, they would, without fail, start to put square brackets around the phrases they couldn't agree on. It was just human nature.
The weeks and late nights were necessary, he explained. People needed to feel they had exhausted all options, and themselves, before they would compromise. This time, world leaders had looked each other in the eyes, said Nick, and said to each other, "We want a deal." So on Friday night, if it wasn't going well, Obama, France's Laurent Fabius and Germany's Angela Merkel would get on the phone to any recalcitrant nations.
First thing Friday, while collecting the latest iteration of the text from the printers, I stumbled on a Chinese negotiator. He allowed himself to be harangued for a few minutes. Yes, he said, the talks overnight were tense. Yes he needed sleep. No the text was not equitable, not what he wanted to take home. Then he was ushered into a meeting with the Indian environment minister and the door was closed.
There is no way the final draft will make tomorrow's deadline of 9am, said a western negotiator who had also worked through Thursday night. It needed to be legally "scrubbed" for about six hours before being tabled apparently. Then 195 countries would decide if they could accept it. It would be "a very tough moment," he warned, but the text was getting into a shape fit for ministers and the atmosphere was still pretty good with no "flaming rows" that he was aware of.
In some cases the negotiations came down to the difference between "shall" and "should". The former being legally binding, and the latter not.
Amber Rudd, the UK Secretary of State for Energy and Climate Change told us that if there was anything in the text that the UK was really not happy with then her team might visit the other side before the final plenary to try and find a compromise. There would be "frantic running around," she predicted.
After a suspenseful morning, the final draft was eventually released midday Saturday. "It's rare to have an opportunity in a lifetime to change the world," UN Secretary General Ban Ki Moon told delegates. "France asks you," pleaded President François Hollande. Laurent Fabius, French Foreign Minister and President of the COP, quoted Nelson Mandela: "The world is holding its breath, it counts on all of us."
Then everyone went away to examine the text before a meeting scheduled for 3.30pm. Most cafes on site had shut by now and exhausted teams were running low on food and water. 3.30pm came and with it, an announcement that the meeting was delayed by two hours.
But at 7pm, more than three hours later, there was still no meeting. The plenary room was full of confused delegates. Speculation blossomed. A rumour circulated that the Americans were unhappy about the "shall" in article 4.4. They wanted "should". A message had come through from a cameraman in the plenary: "There's something up with the South Africans."
Shortly after 7pm, Laurent Fabius appeared on stage. His hands were trembling. The "shall" in article 4.4 was an error, he announced, due to sleep deprivation. This and several others were being corrected.
Then, without very much more ado, he declared the agreement accepted and shakily banged his gavel. Cheering, hugging and crying erupted among the ministers and diplomats. Even US Secretary of State John Kerry was blinking hard.
For us, the gavel was our signal that the conference was shutting down. The media studios were packed up around us. I learned that a South African representative had started a rumour by rushing out of the plenary. It wasn't because they were upset with the text though, just desperate for a bite to eat after all the delays.
The speeches continued for hours but some delegates started dashing for planes and trains. "I have to go now, I have to GO HOME," interrupted Brazil's exhausted environment minister, pulling away from my microphone during an interview.
Game over. Two weeks and enough iterations for everyone, a deal done.