A primary school has won what its head teacher has called a landmark ruling at the High Court over attempts to force it to be an academy.
Yew Tree Primary in Walsall was rated inadequate by Ofsted inspectors in 2019 and the education secretary said it must become an academy to improve.
The school challenged the order but the Department for Education (DfE) refused to revoke it.
A High Court judge called the decision "irrational" and quashed the ruling.
Academies are state-funded schools independently run by academy trusts or chains.
Governors at Yew Tree said a follow-up Ofsted inspection in October 2019 improved the inadequate rating to "requires improvement".
Head teacher Jamie Barry said the school made further improvements and he believes they would have been rated as "good" in 2020 if inspections had not been suspended due to the coronavirus pandemic.
But the education secretary Gavin Williamson refused to revoke the order as the court heard he did not believe the improvements met a definition of being an "exceptional circumstance".
The judge disagreed and ordered the decision quashed.
Mr Barry said it was "a landmark ruling" but the school still had to convince Mr Williamson not to turn them into an academy in the future.
"There is a long way to go because the policy still exists and that still needs to be looked at because forced 'academisation' could still happen in the future," he said.
Yew Tree is run by Sandwell Council which said it was "delighted" the school would stay under its control.
A spokesperson for the DfE said it would consider its next steps.
They added they might appeal the court's decision or "assess a new application from Yew Tree to set aside their academy order".