The head of Ofsted has defended single-sex schools after a court ruled that gender segregation at the UK’s first state-funded Muslim school was a form of discrimination.

The Al-Hijrah School in Birmingham, which was slammed for having books promoting rape and violence earlier in the year, was found guilty of “unlawful discrimination” by the appeals court last week because boys and girls were kept apart at all times. They were forced to use different corridors and sit on opposite sides of the school hall.

Following the ruling, there were fears that Christian boys and girls schools could be targeted next, and the Muslim Council of Britain criticised the decision by questioning why single-sex schools were not regarded as discriminatory.

“It is unclear why the rationale provided by Ofsted – that gender separation fails to prepare pupils for life in modern Britain – is not equally applied to single-sex schools which are leading the school league tables,” the council said in a statement.

Some parents, meanwhile, blamed the ruling on anti-Muslim bigotry.

I've been speaking to parents who say the ruling against Al-Hijrah School in #Birmingham is part of a smear campaign against Muslims. pic.twitter.com/3pORXuWSHy — Laura Chiverton (@LABMidlands) October 13, 2017

However, Amanda Spielman, the head of the schools’ inspector Ofsted, defended single-sex institutions, arguing they encouraged the sexes to mix by interacting with different schools and pointed out that girls’ schools excel in science.

The Muslim school, meanwhile, was separating the sexes to enforce gender difference and uphold cultural norms that were not in keeping with modern Britain.

“There is a more fundamental point, which is the purpose of the segregation. If women are to take their full place in a world which is, to some degree, loaded against them, then it is reasonable for parents to choose single-sex schools, to stop girls from selecting themselves out of some areas of education,” she told The Times.

Read a statement from @amanda_spielman about today's court judgement on Al-Hijrah school https://t.co/KUo6gYeydM — Ofsted (@Ofstednews) October 13, 2017

“That is why most single-sex girls’ schools emphasise tackling gender stereotypes and push girls to pursue their interests in ‘typically male’ subjects,” she added.

She was referring to data on the proportion of girls studying sciences, and physics in particular, at A-level. Girls are almost two and a half times more likely to study A-level physics at a girls’ school than a mixed school.

However, the purpose of gender segregation in Al-Hijrah was different, she said. The court found that segregation was a defining feature of school life, so that girls studying at Al-Hijrah may never interact unsupervised with males they were not related to.

“In this case, the school has become the vehicle for enforcing the community norm, a norm that is at odds with life in modern Britain and over which children have no choice,” Ms. Spielman said.

Last Friday, it was reported that three Court of Appeal judges in London overturned a finding from last year by a High Court judge that Ofsted was wrong to penalise the mixed-sex Al-Hijrah school in Birmingham.

School taken over by government https://t.co/EIEEVWFWed — Breitbart London (@BreitbartLondon) July 17, 2017

Pragna Patel of Southall Black Sisters said the ruling was a vital step in the fight against fundamentalist Islam and the rise of sharia law.

She said: “We very much welcome the judgement and its recognition that gender segregation can be unlawful and discriminatory, especially in contexts where the practice is tied to the rise of religious fundamentalist and conservative norms.

“For over three decades, we have seen how regressive religious forces have targeted schools and universities as a means by which to control and police female sexuality in minority communities.

“The imposition of gender segregation, dress codes and sharia laws are just some means by which gender inequality is legitimised and promoted despite the serious and harmful consequences.”

In September, it was reported that a survey of primary schools in England found that one in five primary schools listed the hijab within their uniform policy.