SNP government blushes were spared at the eleventh hour tonight when strike action which would have crippled rail services in Scotland during COP26 has been called off after the RMT accepted a pay deal.
The union said the offer will provide them with a one year 2.5% pay rise, improved conditions and a COP payment for all ScotRail staff.
It also means an end to Sunday strikes which have been ongoing since March.
ScotRail welcomed the agreement, which comes just four days before the start of the UN climate summit.
The Scottish government said it was “proud” to have brokered and funded the deal.
RMT Scotland organiser Michael Hogg told the BBC: “For the first time in eight and a half months, normality returns to Scotland’s trains.”
The announcement was made on Wednesday evening following talks between the trade union and transport bosses.
Ian McConnell, ScotRail chief operating officer, said: “We have reached a pay agreement with the RMT trade union that resolves strike action.
“We look forward to Scotland’s railway playing its part in delivering a successful COP26 next week.”
The union had been given until 17:00 on Wednesday to accept the same deal which had been agreed by three other unions.
It then announced ScotRail had accepted a counter offer after the 17:00 deadline.
The union confirmed that planned industrial action, scheduled to start on Monday, would be “withdrawn immediately” as members welcomed a recent agreement on a pay rise.
In a letter sent to union members following talks on Wednesday evening, RMT general secretary Michael Lynch said: “By accepting the offer all industrial action is now cancelled and I instruct you all to work normally on the days you had previously been instructed to take action on.”
Mr Lynch said the union’s offer was accepted “unanimously” by delegates.
Transport minister Graeme Dey said he was pleased the union reached out to restart discussions based on the offer that had been made to them on Sunday.
He added: “Now an agreement has been confirmed the strike action will thankfully come to an end.
“As well as getting the pay rise they deserve, railway workers can now go back to delivering rail services for people right across Scotland and as well as for those attending COP26.”
Up to 30,000 delegates are set to descend on Glasgow for COP26, which runs from Sunday to 14 November.
Another dispute could see thousands of council workers across Scotland including refuse, recycling, maintenance and school catering and janitorial staff taking strike action during the second week of the climate talks.
ScotRail is currently run by Dutch firm Abellio – but will be taken over by a company owned and controlled by the Scottish government in March next year.
The move was announced by the government earlier this year after Abellio was stripped of its contract three years early amid concern over its performance.