The state of secondary school buildings in Wales has been branded a "disgrace" and a "scandal" after inspectors found problems in almost half of the schools they visited.
More than four out of 10 high schools inspected over the past year have substandard accommodation or facilities, according to the Estyn annual report, published this week.
Dr Bill Maxwell, the chief inspector, criticised local authorities for being too slow in dealing with unsuitable buildings.
Although previous reports have criticised the quality of school buildings, this is the first time the scale of the problem has been identified.
This year had been earmarked by the first Assembly government as the point by which all of Wales' school buildings should be "fit for purpose"; a target which was quietly abandoned in 2006 when ministers conceded that it was unrealistic.
Recent estimates have suggested that the maintenance backlog for all of Wales' maintained schools could be more than pound;620 million.
Several teaching unions were shocked by the findings of the chief inspector and demanded action.
Rex Phillips, Wales organiser of the NASUWT, said: "It's a national disgrace that not all schools are fit for purpose, especially when you compare that to the aims and aspirations the Assembly government originally had for this year. Much more needs to be done."
Dr Philip Dixon, director of the Association of Teachers and Lecturers, said: "This is nothing short of a national scandal. We have been warning about the state of school buildings for several years and the effect that they are having on standards and morale."
Gareth Jones, secretary of the Association of School and College Leaders Cymru, said he is glad the scale of the problem has at last been quantified.
"I think the chickens are coming home to roost in terms of the way we have funded schools over the last decade," he said. "It's interesting when you visit schools in England and compare with those in Wales you can see a vast difference. The fear is that we are now entering an age of economic austerity, so where's the funding going to come from?"
Dr Maxwell said although extra investment would be welcome, schools and local authorities should make better use of existing resources to improve their buildings.
"We need to make sure resources are put where they are needed and this does put an onus on the system to run as effectively as possible so we are not wasting money on buildings past their sell-by date," he said.
"We have seen a number of examples of providers that are making good progress on this."
The Assembly government has made a commitment to deliver schools fit for the 21st century as part of its "One Wales" agenda. Annual capital investment has increased from pound;82 million in 200203 to pound;168million in 200910.
A spokesman said: "Since 2002, more than 1,900 projects have received a school buildings improvement grant, including 184 costing over pound;500,000."
Education minister Leighton Andrews he would give "careful consideration" to all of the report's findings.