An extraordinary face-to-face encounter between two powerful women, sitting in the midst of a giant huddle in a packed conference hall, finally sealed the Durban climate change agreement as dawn was breaking yesterday, when many had given it up for lost.

After a fortnight of talks and two final all-night negotiating sessions, with the meeting on the edge of collapse, Connie Hedegaard, the Dane who is the European Union's leading climate negotiator, persuaded her Indian opposite number, Jayanthi Natarajan, to accept a form of words meaning that all countries in the world – India included – would be legally bound, in a future climate treaty, to cut their emissions of greenhouse gases.

Ms Natarajan finally agreed to the disputed text despite the fact that her senior officials were telling her she did not have the latitude to do so, and that she had to refer the matter back to the Indian cabinet. Her show of independent-mindedness saved the meeting, and made possible the prospect of a new way forward for dealing with global warming.

The Indians had all along been the main objectors to the idea of a legally-binding agreement, and in the early hours proposed text which EU negotiators believed undermined the idea, although you need to be an expert in the arcane dialect of UN treaties to understand this.

They suggested that the new treaty should have "a legal outcome"; but EU negotiators were convinced this could refer merely to decisions of future meetings of the UN Climate Convention such as the Durban one, and would not be binding in international law. The European Union roundly rejected it, threatening the talks with collapse.

Eventually the chief Brazilian negotiator, Luiz Figueiredo Machado, suggested another form of wording – "an agreed outcome with legal force", which became known as the Figueiredo Compromise. Although many might think there is little difference in the wording, all 27 EU member states agreed that this really did mean "legally binding" in law, whereas the first phrase did not, and agreed to accept it.

The Conference's president, the South African Minister Maite Nkoana-Mashabane, then invited the contending parties to go into a huddle – in the middle of the plenary session, the full coming together of all delegates, which was going on in the Baobab Hall of Durban's International Convention Centre.

Watched intensely by leading negotiators from many key states, including Todd Stern from the US and Xie Zhenhua from China, who were looking over their shoulders – as the photo opposite shows – Ms Hedegaard and Ms Natarajan then argued the toss, with the Indian minister eventually giving way, accepting the revised text, and making agreement possible.

There is no doubt that the outcome was a notable success for the European Union as a corporate body acting together, as all member states had maintained a completely united front over their quest for a new climate treaty which for the first time would bind all nations legally.

EU negotiations in the conference were led by Britain's Energy and Environment Secretary, Chris Huhne, and his German opposite number, Norbert Roettgen – although it was Ms Hedegaard who finally clinched the deal.