Campaigners have failed in their High Court bid to stop a primary school in north London from being converted into an academy.
In June the Department for Education (DfE) said the "under-performing" Downhills Primary School in Tottenham would become an academy in September.
Seeking a judicial review, parents accused the government of "bullying".
But Mr Justice Kenneth Parker said that given the school's "egregious" past performance, the decision was rational.
Following the ruling, Save Downhills campaigners said they were "disappointed but not surprised".
They are considering whether to appeal against the court's decision.
A DfE spokeswoman said: "We are very pleased that the court has recognised that the consultation and the secretary of state's decision were undertaken fairly and lawfully."
The new academy will be run by an education charity, the Harris Federation.
The High Court judge said it was clear from Education Secretary Michael Gove's letter giving his decision that he "simply had no confidence" that the school, run by Haringey Council, would substantially improve.
The letter stated that Mr Gove "believed firmly" that if Downhills were to become an academy its performance would improve.
Given the school's years of "egregious" performance, the education secretary's decision seemed rational and one which he was entitled to take, the judge said.
The DfE spokeswoman said: "Downhills has been under-performing for several years.
"Ofsted found that the school had failed to give its pupils an acceptable standard of education and that those responsible for leading, managing and governing the school hadn't demonstrated the capacity to secure the improvement necessary.
"The new academy will open in September and will be sponsored by Harris, a not-for-profit educational charity, which has already turned around a number of previously failing schools in London, nine of which have now been judged by Ofsted as outstanding."
A statement from the Save Downhills campaign group said: "Today's ruling shows that consultation during academy conversion is irrelevant.
"Parents' voices have been completely ignored.
"Downhills is a happy, inclusive and improving school, as the latest test results and Ofsted monitoring will show.
"However Mr Gove clearly believes that the only answer to school improvement is academy status. This is not borne out by the evidence.
"We believe we are the victims of his wider political agenda.
"He relied on historical performance data to denounce the school and he totally disregarded the views of 94% of stakeholders.
"We continue to believe Mr Gove has abused his power, denying parents and local communities their legitimate voice."
Following an Ofsted report the school was placed in special measures in February, and in June the DfE dismissed the board of governors and appointed an interim executive board to manage the school.