An Islamic faith school's policy of segregating boys from girls is unlawful sex discrimination, leading judges in England have ruled.
Three Court of Appeal judges in London overturned last year's finding by a High Court judge that Ofsted inspectors were wrong to penalise the mixed-sex Al-Hijrah school in Birmingham on the basis of an ''erroneous'' view that segregation amounted to unlawful discrimination.
In a test case ruling today, the Master of the Rolls Sir Terence Etherton, Lady Justice Gloster, and Lord Justice Beatson unanimously allowed a challenge by Ofsted's chief inspector Amanda Spielman against Mr Justice Jay's decision.
The ruling will affect other schools in the UK which have a segregation policy.
The appeal judges held that the school's policy of complete segregation from year five caused detriment and less favourable treatment for both male and female pupils by reason of their sex, and was contrary to the 2010 Equality Act.
For religious reasons the voluntary-aided school, which has pupils aged between four and 16, believes that separation of the sexes from year five onwards is obligatory.
It has complete segregation of boys and girls from nine to 16 for all lessons, breaks, school clubs and trips.
In a landmark decision, the appeal judges said: "It is common ground that the school is not the only Islamic school which operates such a policy and that a number of Jewish schools with a particular Orthodox ethos and some Christian faith schools have similar practices."
Ofsted had made it clear, they said, that if this appeal succeeded, "it will apply a consistent approach to all similarly organised schools".
The judges said there was "a strong argument" for the Education Secretary and Ofsted "to recognise that, given the history of the matter, their failure (despite their expertise and responsibility for these matters) to identify the problem and the fact that they have de facto sanctioned and accepted a state of affairs which is unlawful, the schools affected should be given time to put their houses in order in the light of our conclusion that this is unlawful sex discrimination".
They added: "The relevant central government authorities should not pivot in the way they have gone about this without recognising the real difficulties those affected will face as a consequence."
Ms Spielman said after the ruling: "I am delighted that we have won this appeal.
"Ofsted's job is to make sure that all schools properly prepare children for life in modern Britain. Educational institutions should never treat pupils less favourably because of their sex, or for any other reason.
"The school is teaching boys and girls entirely separately, making them walk down separate corridors, and keeping them apart at all times.
"This is discrimination and is wrong. It places these boys and girls at a disadvantage for life beyond the classroom and the workplace, and fails to prepare them for life in modern Britain.
"This case involves issues of real public interest, and has significant implications for gender equality, Ofsted, government, and the wider education sector. We will be considering the ruling carefully to understand how this will affect future inspections."
Rebecca Hilsenrath, chief executive of the Equality and Human Rights Commission, said: "Regardless of their gender, every child has the right to an effective education - and one which lets them be themselves and mix with whoever they choose.
"For this reason, we welcome today's confirmation by the Court of Appeal that it is unlawful for a mixed school to segregate girls and boys completely.
"Socialisation is a core part of a good quality education, just as much as formal learning, and without it we're harming children's life chances right from the start.
"The Government's recent race disparity audit highlighted clear attainment gaps and it is important that in addressing those gaps our schools operate in ways that reflect and reinforce the country's values of fair treatment and respect."