SO close and yet so far.

After all the passion, protests and politicking, COP26 was just about on course to make a significant move to begin the end of the era of coal.

But a last-minute intervention by India, one of the world’s biggest coal-users, decided to hamper this part of the process.

In the final informal plenary session, America’s John Kerry appealed to fellow delegates to back the draft agreement, invoking the old adage: “Don’t make the perfect the enemy of the good” while the EU’s Frans Timmermans warned delegates their children and grandchildren would “not forgive us if we fail”.

Several nations made clear their unhappiness at certain parts of the summit’s final text but said, in the spirit of compromise, they would accept it; except, that is, India, which wanted reference to the phasing out of fossil fuels and their subsidies stripped out.

Minutes later, its delegation was in a closed room with counterparts from the US, China and the EU as they applied the diplomatic thumbscrews. But it seemed clear India was prepared not to agree the deal unless it got its way.

This was to replace a commitment to “accelerate the phasing out of unabated coal and inefficient fossil fuel subsidies” with “phasing down”. Quite a difference.

In the conference hall, several delegates could not hide their dismay at the last-minute change.

Alok Sharma, the COP26 President, after hours of sleepless haggling, was visibly emotional, apologising for the way the process had unfolded. He told the summit: “I am deeply sorry.”

With applause ringing in his ears, Sharma then said: “I understand the deep disappointment but it’s vital that we protect this package,” calling for the revised text, with India’s proposed change on coal, to be agreed. Delegates reluctantly did so.

Yet for the first time there is an explicit mention of fossil fuels in a UN climate agreement and it seems clear that the end of coal is in sight; it may just take a bit longer to get there.

Timmermans later said despite his disappointment, he still believed the outcome of Glasgow would help the world shift away from the fossil fuel. “I believe this conclusion will help us work in that direction.”

Rather than great strides, COP26 made significant steps towards meeting the Paris Agreement aim - keeping alive the need to limit global warming to a rise of 1.5C. The imperative now is delivery.

With nearly 200 countries taking part, each with their own specific priorities and demands, a grand alignment was never going to be easy. Self-interest was always, to some degree, going to triumph over international solidarity and so it turned out.

Two areas in particular were key for COP26: curbing and then eliminating the use of fossil fuels and providing finance to developing countries to help them cope with the effects of climate change and transition to greener economies.

After an overnight session, negotiators emerged blinking into the grey morning light with a third nuanced version of a draft agreement.

As well as a move on coal, richer nations were urged to at least double their collective provision of finance to help developing nations adapt to climate change. $100bn of annual aid has already been pledged but has not yet been delivered.

Also, countries were called on to strengthen their 2030 emission-cuttings targets by December 2022 to meet the 1.5C goal, recognising they’re currently nowhere near strong enough.

Interestingly, the agreed text referred to “funding” for compensating the most vulnerable countries for the “loss and damage” already suffered by climate change generated by the richer nations, which thus far have sought to avoid creating any sense of an open cheque-book for reparations.

Days before COP26, an uncharacteristically sombre Boris Johnson admitted the aim of the summit was simply to keep “1.5 alive”. The so-called “Glasgow train of ambition” may have done this but only just and now all eyes will be on its arrival at COP27 in Egypt this time next year to see if countries have upped their game.

One hopeful development came when, unexpectedly, the US and China announced a collaboration agreement to reduce global warming. Together, they account for 43% of all CO2 emissions. Indeed tomorrow, Presidents Joe Biden and Xi Jinping are due to hold a video-call to see how they can make progress.

Another was a group of nations and regions creating an alliance to stop offering new licences for oil and gas production. Nicola Sturgeon said Scotland was seeking to become a “friend” of the alliance while the PM said he would “look at” its proposals.

To achieve the 1.5C CO2 limit, global coal use needs to fall by around 80% by 2030.

And yet carbon research has found depressingly that major Asian nations like China are collectively planning to build more than 600 coal power plants.

India’s move on the “phase down” of coal will prove to some that COP26 was in fact FLOP26.

Across Glasgow protesters from Extinction Rebellion, at a mock funeral ceremony at the city’s necropolis, denounced the summit’s “failure and stupidity”.

Greta Thunberg, the Swedish teenage campaigner, branded COP26 a failure and warned of a “tsunami of greenwashing and media spin".

And yet for all the understandable disappointment on not sealing a stronger agreement, progress has been made across several fronts, not only on a start to ending reliance on fossil fuels but also agreeing to reverse deforestation and cut methane emissions.

What gives hope is that a global momentum for action is now picking up pace thanks in no small measure to the younger generations telling the older ones to pull their fingers out. We can only hope this momentum feeds itself into the minds and hearts of world leaders and their governments up to COP27 and beyond.

Whatever agreements on paper are reached now and in the future to save the planet for our children and grandchildren, it will be the practical action taken over the next 10 years that will, ultimately, be a testament to future generations of whether or not our mettle met the challenge.