The total number of teachers in Scotland has fallen by 1,348 over the past year, according to Scottish government statistics.
Opposition parties rounded on Education Secretary Fiona Hyslop, with Labour calling for her to be sacked.
Ms Hyslop admitted the fall in teacher numbers was "unacceptable" but blamed councils for spending cash earmarked for teachers on "other purposes".
However, councils said it would be "economic suicide" to maintain numbers.
The average primary class size last year was 23.1 pupils, down from 23.2.
Cutting class sizes to a maximum of 18 in the first three years of primary school was an SNP manifesto pledge before it won power at Holyrood in 2007.
The statistics said 13.2% of P1-P3 pupils were in class sizes of 18 or fewer, a figure which was unchanged from 2008.
Labour leader Iain Gray said: "Enough is enough. These figures today show the complete failure of Fiona Hyslop on teacher numbers. It's time now for Alex Salmond to do the right thing and turf her out of his cabinet.
"She has failed on teacher numbers, on school building, on teacher training and the Curriculum for Excellence.
"Every time she's taken to task she blames someone else - the councils, the recession, the Westminster government. But these are her failures - she should carry the can and Alex Salmond needs to act now."
Ms Hyslop blamed councils for the drop in teachers numbers.
The education secretary singled out Glasgow which she said was "responsible for more than one quarter of the total fall in teacher numbers".
She said: "Half of Scotland's councils have delivered improvements in primary school class sizes. Half have not. What is more, there has been a sharp fall in the number of teachers. That is simply unacceptable.
"We now have to find a new way forward to ensure class size reductions in P1 to P3 are delivered in all of Scotland's councils."
'Surprised and disappointed'
She added: "In our concordat with local government it was explicitly accepted that sufficient funding had been made available to maintain teacher numbers at 2007 levels. Council budgets are also rising, total education spending is up and nationally attainment is improving.
"The recession and other pressures mean slower progress on class sizes was inevitable but overall, councils have clearly spent over £110m of funding provided by the Scottish government for teachers salaries on other purposes."
Councillor Isabel Hutton, education spokeswoman for local authority umbrella body Cosla, said she was "surprised and disappointed" at the negative comments.
"The last time teacher numbers sat at the levels we see today we had over 100 more schools and almost 47,000 more pupils," she said.
"Councils are under constant pressure to deliver efficiency savings and best value and it would be economic suicide to maintain teacher numbers while experiencing falling school rolls, rising salaries, and record demands on children's services."
She added that class sizes had improved and local government had delivered year-on-year progress exactly as it had agreed in the concordat.
Ronnie Smith, general secretary of the EIS union, said the teacher numbers made for "bleak reading".
"It is not acceptable for the Scottish government and local authorities to continue to blame each other and attempt to wash their hands of responsibility.
"We are reaching crisis point, and without urgent and sustained action at both Scottish government and local authority level, the damage to our education system and to our children's futures could be catastrophic."
Conservative MSP Liz Smith said: "Under Fiona Hyslop's watch over 2,000 fewer teachers are now employed in Scotland. That is a shocking reflection of the SNP government and its manifesto commitments on education have been completely torn to shreds.
"That is a completely unacceptable situation. Hapless Fiona Hyslop should hang her head in shame."
Liberal Democrat Education spokesperson Margaret Smith MSP said: "If Fiona Hyslop had any sense, she'd jump before Headmaster Salmond gives her the boot.
"The Education Secretary has tried to wriggle out of her terrible record on teacher numbers by saying that the pupil-teacher ratio has improved. Today's statistics show that she's failing on that too.
"The SNP promised lower class sizes and more teachers but delivered neither. The responsibility for both failures lands squarely on the shoulders of Alex Salmond and Fiona Hyslop."
Total pupil numbers are projected to drop from 677,000 in 2009, to 662,000 in 2015, but then to rise until peaking at 684,000 in 2022.