On December 14, it looked like the talks were running into the sand when the unions virtually walked out. By January 4, the local authorities and the Scottish Executive were at loggerheads over funding. By January 12, there was talk of triumphs, watersheds, turning points and bridges to the future. It was a done deal.
The key difference in these negotiations, absent from the past decade, was the involvement of ministers and their officials. Most particularly, the arrival of Jack McConnell as Education Minister brought an energetic determination to reach a settlement. This coincided with an equal determination by union and education authority leaderships that there should be peace in our time, if not in our classrooms.
Mr McConnell's particular contribution, said to be "massive", was his extensive network of Labour Party contacts which allowed him to indulge in some gentle arm-twisting, his awareness of significant political gains for him personally as "First Minister in waiting" and, in the words of one participant, his "gut feeling for the classroom".
Personal chemistry helped in other ways. The teachers' side, effectively the Educational Institute of Scotland, picked its team carefully. The choice of May Ferries, a former EIS president, veteran Glasgow activist and deputy primary head, was inspired. She is frequently credited by management with creative thinking, particularly in relation to continuous professional development.
Malcolm Maciver, the genial but experienced EIS salaries convener, was said to have brought a calming influence by "keeping everyone on board". Ronnie Smith, the EIS general secretary, and Ken Wimbor, the union's negotiating secretary, were "the sticklers for detail".
The key Executive officials were unusual. Mike Ewart, head of the schools group, is widely regarded, while Jeane Freeman, his head of school standards and improvement, is a recent recruit from outside the civil service and much admired by Mr McConnell. Neither came "with baggage", according to the unions.
Local authority negotiators for the most part seemed to jettison their baggage from previous talks. David Montgomery, chief executive of East Ayrshire Council and a former senior depute director of education in Strathclyde, was said to have brought a fresh perspective. Jim Gibson, personnel officer with the Convention of Scottish Local Authorities, was the councils' grafter.
The presence of Keir Bloomer, former president of the Association of Directors of Education, was - as always - a running sore with the unions. Despite being intellectually gifted, or perhaps because he was intellectually gifted, the teachers viewedhim as intellectually rigid and therefore "a crap negotiator". His departure to become chief executive of Clackmannanshire was said to have eased the tensions.
Storm signals appeared on December 14 at a meeting of the pay and grading subgroup, one of the five which reported to the main implementation group. The key issue was salary conservation for promoted staff whose jobs were affected by restructuring. Without this the unions knew they could not sell a deal.
Ronnie Smith of the EIS put it bluntly to the authorities: "You want restructuring. The question is who pays, you or our members. If it's our members, forget it."
By the time the main implementation group met for what was supposed to be its last meeting on December 18, four issues remained: salary conservation, the extra 35 hours for continuous professional development (CPD), pay levels and funding for the deal as a whole.
The impasse led to the key players meeting in Edinburgh's Carlton Highland Hotel on December 20. It was crunch time. Christmas was definitely heading for cancellation.
This was when Mr McConnell was said to have come into his own. His contribution was "crucial" say those who were present. His finest hour was in recognising the importance of salary conservation.
After clearing CPD out of the way, only salaries and funding remained deadlocked. By the time all sides revealed there was a problem, the key officials were on holiday. Mr McConnell had to go before the scheduled "final" meeting of the implementation group on January 5 and apologise for the lack of information. Meanwhile he was having to convince Cabinet colleagues that the game was worth the candle.
By the time Mr McConnell made his statement to Parliament on January 10, sufficient progress had been made for an air of optimism to have emerged. Unknown to MSPs, however, large chunks of the pay details issued to the unions were wrong and had to be reworked. Assurances had also to be given to the local authorities. The latter took the form of a letter from McConnell to Norman Murray, president of Cosla, promising a review of "additional burdens" arising from the agreement in 18 months' time, as well as an undertaking to ease restrictions on excellence fund money for schools.
Meanwhile the EIS salaries committee poured over the fine detail. The hard work then paid off: 13 to nil in favour of the deal. There was only one abstention from Tom Tracey, Inverclyde, and that was over whether there should be a recommendation to support the agreement in the teachers' ballot.
The next challenge is today's meeting of the EIS executive council. But the ultimate challenge, as Ronnie Smith put it at last Friday's news conference, is whether "mind-sets" can now be changed.