Primary one classes with more than 25 pupils have been almost eliminated, according to new statistics.
The number of pupils being taught in classes of more than 25 has fallen from 16,845 in 2006 to 503 in 2012 - a drop of 97% over six years.
Reducing class sizes was a key aim of the SNP’s education manifesto ahead of the 2007 and 2011 Holyrood elections.
Education Secretary Michael Russell said: “We want Scotland to be the best place in the world to grow up and our schools are critical to that ambition.
"Despite pupil numbers increasing, we have almost wiped out primary one classes of more than 25 - the number of primary one children in these classes has fallen by 97% since 2006 and we have made clear progress since introducing legislation. We are providing stability in our classrooms and have halted the decline in teacher numbers evident since 2007.
"We know the importance of investment in the early years and we are succeeding, with access to a registered teacher in nursery increasing to 75.4%. Small class sizes are a vital part of our commitment to the early years, so where pupil numbers are rising I anticipate that councils will increase teacher numbers in future.
"Real progress is being made. We are delivering for our schools and our schools are delivering for their pupils. We will continue to work hard to make further improvements and, despite the difficult financial circumstances we face, we are confident we can go on delivering on our ambition to make Scotland the best place to grow up."
However, the reduction in primary one class sizes was not replicated elsewhere. The average class size for pupils in the first three years of primary school increased from 22.5 in 2011 to 22.6 in 2012. The percentage of these pupils who were in class sizes of 18 or fewer dropped from 20.2% in 2011 to 18.8% in 2012. Figures sow 99.1% of primary pupils were in classes of 25 or fewer.
Elsewhere, schools have recorded improvements in their building structures and conditions. Between financial years 2007/08 and 2011/12, 403 schools were rebuilt or refurbished. The proportion of schools found to be in “good” or “satisfactory” condition rose from 61% April 2007 to 82% in April 2012.
The number of schools found to be in “poor” or “bad” condition fell from 37% in April 2007 to 16% in April 2012.