The teachers' pay and conditions agreement struck earlier this year is safe for now, after figures published this week showed the number of teaching staff had stayed just above a nationally-agreed target.
There were 51,286 teachers working in local authority schools on census day in September - 155 above the minimum of 51,131 set earlier this year through the Scottish Negotiating Committee for Teachers (SNCT).
The news was talked up by Education Secretary Michael Russell, on a day when he said Scottish Government statistics showed "steady progress" on various issues, such as class sizes, attainment, leaver destinations and exclusion rates. He highlighted a record-low P1 class-size average of 20.5
"From today's information, the outlook for Scotland's schools is good," Mr Russell said. "But I must stress that we are not complacent. In the face of Westminster cuts we will continue to work hard to deliver further improvement."
Had teacher numbers fallen below 51,131 - a figure agreed by the Government, local authorities' umbrella body Cosla and those teaching unions on the SNCT - the teachers' agreement would have been at risk.
Local authorities would have lost pound;40,000 for each full-time teacher below 51,131. There was also the possibility of reverting to the previous agreement, although there was a get-out clause: if blame could be pinned on a few specific authorities, measures would be taken purely against them.
Labour education spokesman Ken Macintosh highlighted the Government's "decision to publish an unprecedented volume of education statistics on one day", which, he said, "looks suspiciously like an attempt to bury bad news by the SNP".
He attacked the SNP for cutting teacher numbers by 3,700 since coming to power, adding that pupil-teacher ratios had increased in both primary and secondary schools.
"The tragedy is that behind each of these statistics is a pupil not getting the time, attention and quality of education they deserve," he said.
The highest number of teachers since the Scottish Parliament came into being in 1999 was around 55,000, in 2007, but school rolls have been dropping in recent years, and student-teacher intakes to universities were slashed in 2009.
The new statistics were welcomed by Ronnie Smith, general secretary of the EIS teaching union, which alienated many members by signing up to the teachers' agreement.
"This was a very difficult deal to negotiate, and it did involve willingness to compromise by Scotland's teachers in the light of the budget- cutting agenda," he added. "But it is clear that the decision taken by the EIS to focus on protecting teaching jobs and enhancing job prospects for new teachers was the correct one.
"As a result of this agreement, thousands of newly and recently-qualified teachers who would otherwise have faced job uncertainty are in stable employment as teachers throughout Scotland."
Cosla human resources spokesman Michael Cook said: "No one would pretend that it was easy to sign up to the packages of changes that were negotiated earlier this year, or that educational outcomes are purely dependant on teacher numbers.
"However, that deal has allowed councils to further safeguard education budgets by protecting teaching jobs from the cuts that were being handed down to them."
51,286 - Teachers in local authority schools.
51,131 - Minimum number of teachers permissible under new agreement.
16% - 2010-11 probationers in full-time permanent jobs by September; another 35 per cent had full-time temporary work.
83% - Pupils in schools which were in "good or satisfactory" condition in April 2011, up from 61 per cent in April 2007.
26,844 - Pupil exclusions, down 11 per cent from 2009-10 (30,211) and 40 per cent from 2006-07 (44,794).
89.9% - Pupils leaving school for higher or further education, training or employment, up from 86.8 per cent in 2009-10.
Original headline: Teacher numbers safeguard pay and conditions deal