The Department for Education has been told it must not allow the closure of the only residential school in the West Midlands specialising in children with behavioural and learning problems.
Walsall local education authority had wanted to shut the 30-pupil Beacon School in Lichfield, Staffordshire, claiming that the numbers were too low to be viable.
But in a legal review of the DFE's support for the council's closure plans, a High Court judge has now told Education Secretary Gillian Shephard that the school must stay open. The DFE, he said, had been acting on out-of-date information about the school. The parents said there were no alternative places for the children.
The child mental health charity Young Minds has been campaigning on behalf of schools offering therapeutic care for children. Its director, Peter Wilson, said that the plight of the Beacon School illustrates the shortage of suitable care. "Residential schools have been out of favour with many people. But we can't get away from the fact that there are some children who need and benefit from that kind of provision," he said.
"It also matters that these places are not too far away from the home. Sometimes children are sent far too far away."
Walsall had been so determined to close the school that it had ceased to refer any pupils there. The school roll - now full - is almost entirely made up of children from the neighbouring Sandwell and Birmingham authorities which support the school financially.
Walsall has claimed that the school is undersubscribed, expensive to run and that it is unable to offer the national curriculum. But the long-running attempt to close the Beacon had provoked the stern opposition of both neighbouring boroughs and the families with children at the school.
The sort of residential education that the Beacon offers is increasingly hard to find thanks to financial pressures on local authorities and a widespread distrust of institutional care. The most famous casualty has been the Peper Harow school in Surrey which closed in 1992.
Residential places for children with emotional problems are so scarce in the West Midlands that at one point Walsall suggested that the Beacon's pupils should be sent to foster parents - a proposal which provoked outrage from the real families.
Jill Brown, the governors' spokeswoman at the Beacon, said; "I'm delighted at the judge's decision because the school is open for all the children of the West Midlands. The nearest alternative is 60 miles away in Hereford and Worcester. The parents just couldn't get there. That in itself is very important." The school teaches the national curriculum, she said, and is now full with a waiting list.
Mrs Brown said planning permission has been sought for a housing development to be built on the entire school grounds.
Walsall remains determined to close the school in spite of the court decision. "The sooner it's shut the better," said council leader Mike Bird this week. "If the Secretary of State decides not to appeal against this decision then we'll just start the closure procedures all over again."
He said that the decision to close the school was based on the "horrendous" cost per pupil, which at one point stood at Pounds 25,000 a year, and what he described as the school's inability to teach the national curriculum.