All 32 Scottish councils agree not to cut teacher numbers
All 32 councils in Scotland have now agreed not to cut teacher numbers.
First Minister Nicola Sturgeon made the announcement during First Minister's Questions at Holyrood.
One council, understood to be Shetland, had not reached a deal with the government before the official deadline last week. Many non-SNP councils felt they had no real choice but to accept.
The issue led to the most serious dispute between some councils and central government since devolution.
The government was offering councils £51m to maintain teacher numbers.
However if teacher numbers fell, they would lose some of that cash.
Some councils felt they were, in effect, being ordered to keep teacher numbers the same even if they felt there were better uses of their cash.
For others, it was an issue of principle: was local government subservient to central government?
A total of 31 councils had agreed to the funding offer by last Friday. Talks continued with the other one.
The government has attempted to reassure councils they will not lose out if there is a small, unplanned cut in teacher numbers year-on-year - for instance because of staff sickness on the day teacher numbers are counted.
Their concern was over planned reductions in the workforce.
The Educational Institute of Scotland (EIS) union welcomed the announcement.
General Secretary Larry Flanagan said: "The EIS has been very clear that maintaining the number of teachers in our schools is vital to ensure a consistent high level of educational experience for pupils across the country."