The proportion of school buildings in Scotland reported as being in good or satisfactory condition has increased.
Statistics released on Tuesday show 89.9% of schools achieved these levels in April, compared with 88.3% the previous year.
The equivalent figure in April 2007 was 61.1%.
Meanwhile, the proportion of pupils educated in schools reported as being in poor or bad condition has decreased.
About 257,000 pupils (36.6%) were taught in these schools in 2007 compared to just under 62,000 (8.9%) in 2020.
The Scottish Government publication covered all local authority schools on April 1.
It said 30 schools were built or substantially refurbished in the 2019-20 financial year.
Education Secretary John Swinney said more pupils will benefit from investment in the school estate in the near future.
He said: “These statistics show the tremendous progress we are making in building modern, high quality and fit for purpose schools that make a real difference for pupils and teachers.
“Nine out of 10 pupils, more than ever before, are now being taught in good or satisfactory buildings.
“When complete in early 2021, the Schools for the Future Programme will have delivered 117 top quality school projects for more than 60,000 pupils, which does not include the local authorities’ own school improvement programmes.
“And our new £1 billion Learning Estate Investment Programme aims to benefit around 50,000 pupils across Scotland by the end of the next Parliament.”