As mining communities sprang up in the Rhondda during the last century scores of schools were built around them. But the legacy of this Welsh drive for education is crumbling drastically.
Defects were cruelly exposed in the autumn's foul weather. Water poured through leaking school roofs, rotten windows, and ill-fitting doors. There were backfills of sewage: 12 schools were forced to close at various times during the October floods. The repair cost will be huge and not all are adequately insured. Arson is a constant problem.
Kim Ryley, Rhondda Cynon Taff's education director needs Pounds 50 million to address the problem. And that's five times more than his department can afford.
Rhondda Cynon Taff is thought to have more Victorian-built schools than any other local authority in the UK. At the time they were models of their kind. Now they are a liability.
Most of the 170 schools are Victorian or Edwardian and urgently need replacing. "We have constant problems with subsidence because of underground workings," says Mr Ryley. "The land is underpinned by old mines and we've had to demolish one school at Penrhiweeiber, near Mountain Ash."
Since Rhondda Cynon Taff council was established two years ago, control and co-ordination of school repairs has rested with property services rather than the education department. Mr Ryley feels this "unduly complicated" arrangement has compounded problems.
"We manage just to keep on the right side of health and safety. But with modern teaching practices, our schools are well out of date - these buildings weren't designed to last 120 years or more. In such an environment, children don't get a great sense of the value of education. Where we have replaced buildings, it's lifted performance."
The demise of mining has left many in the Rhondda on the breadline: incomes are less than two-thirds the national average and unemployment, in some communities, more than 30 per cent. Mr Ryley hopes that if an ambitious bid to get European money for social regeneration in South Wales succeeds, he can stop the rot and start rebuilding.
"According to EC criteria, we are more deprived than Greece or Portugal. We are hoping for the highest level of relief funding," he said. "There could be up to Pounds 5 billion available. It would be for the major reconstruction of a community from the base up and allow schools to be at the heart of the strategy."
PENYRENGLYN JUNIORAN UNSUITABLE ENVIRONMENT FOR LEARNING
A stench of damp catches the throat the minute you walk into Penyrenglyn Junior School, near Treorchy, a gaunt rotten hulk of a building where plaster crumbles off almost every wall.
The playground, on an incline like most in the Rhondda, is cracking up, and there's been subsidence. Once during a school day, a ceiling collapsed without warning. Only good fortune prevented anyone being seriously hurt.
Everyone agrees that the building, which dates from 1911, is an unfit place to educate 189 children. "Office for Standards in Education inspectors were appalled. They wondered if we could make a link between pupil illness and the state of the school," said John Griffiths, who has been head for almost 20 years. The music room is so damp that, when returning for the autumn term, staff found the piano covered in green mould.
Ofsted commented on the number of wall displays, which not only celebrate the children's work but serve to conceal some of the ugliness. "We have to back them with aluminium foil to stop the damp getting to them," says Mr Griffiths.
That makes extra work, and so does vandalism. Mesh covers the windows: and contractors using scaffolding to repair the roof had to dismantle it at the end of each day to prevent lead being stolen. There is a market among the local criminal fraternity for drain covers; so at Penyrenglyn, these are now secured by locks.
Mr Griffiths shows good-natured stoicism amid the decay. At least since the roof was repaired, water no longer cascades down the walls. But when he'll get his new school - or even if he'll be around to see it - is anyone's guess. The date for a replacement keeps retreating over the horizon.