Almost a third of Scottish schools are in a poor condition, a survey has revealed.
The survey looked at primary, secondary and special schools
The study of the school estate examined the size, condition, value, running costs and capacity of the premises.
In all, it looked at 2,184 primary schools, 383 secondaries and 163 special schools.
A total of £97m was spent on repairs, alterations and maintenance in 2005-06. Work done by public private partnership schemes amounted to a further £95m.
The survey, for the Scottish Executive, found that overall 31% of schools were classed as being in a poor condition, with 5% rated as bad.
A further 48% of schools were regarded as being in a satisfactory state, which means they are performing adequately but may have some minor deterioration in condition.
Only 14% of schools were described as being in a good condition while 1% were new builds and their condition was not reported in the survey.
There were 678 primary schools in a poor condition, with 109 primaries classed as bad.
The survey found 137 of all secondaries were rated as poor for their condition, with 14 described as bad.
A Scottish Executive spokesman said ministers were committed to matching the previous administration's school building programme "brick for brick".
"We want schools to be at the heart of communities and to make sure they are buildings people can be proud of," he said.
The survey also found that almost two thirds of primaries were less then 75% full, while only one in nine were 90% full or more.
In the secondary sector a third of schools were operating at below 75% of capacity, with the same proportion at 90% capacity or more.
Overall, the average level of occupancy for primary and secondary schools has fallen slightly, down from 75% in 2004 to 73% in 2007.