Image copyright Press Association Image caption Both Ofsted and the school have been given leave to appeal the findings

A legal battle continues over whether Ofsted can publish a critical inspection report, after an Islamic state school went to the High Court to seek to overturn its findings.

The court found that the school had not breached equality legislation in how it taught boys and girls separately.

But the judge rejected claims that the Ofsted inspectors had been biased.

Mr Justice Jay, sitting in London, has given both the school and Ofsted leave to appeal.

For legal reasons, the BBC cannot name the school or where it is located.

In the judgement Mr Justice Jay found "no evidence in this case that segregation in a mixed school, still less segregation in an Islamic school, has a greater impact on female pupils".

However, he did not overturn the report and the school remains in special measures.

Responding to the announcement, chief inspector Sir Michael Wilshaw said: "It is our intention shortly to publish a revised inspection report for this school.

"We are, however, disappointed that the court has determined that the practice of completely segregating boys and girls in this publicly funded mixed-sex school does not amount to unlawful discrimination.

"I do not believe that segregating children without an educational reason is in their best educational interests. Ofsted has obtained permission from the Judge to appeal this judgement."

He continued: "As a society, we expect men and women to integrate freely and fully both in the workplace and in social settings.

"Here was a mixed-sex school where children were being kept apart on the grounds of gender. This segregation took place in all lessons, in the corridors, during breaks and lunchtimes and for all social and extra-curricular activities."

'Violence towards women'

Senior inspectors visited the maintained Islamic school and compiled a highly critical report last summer.

The report highlighted a serious failure of leadership at the school, based not just on the segregation of boys and girls, but also on grounds of poor safeguarding of pupils and the discovery of offensive literature in the school library.

According to the inspection report, quoted in the court judgement, these books "included derogatory comments about and the incitement of violence towards women".

The judgement revealed that one of the books stated "that a wife is not allowed to refuse sex to her husband" and another "that women are commanded to obey their husbands and fulfil their domestic duties".

Two books made clear that a husband might in certain circumstances beat his wife, "provided that this is not done 'harshly'".

The Ofsted report said that boys and girls were being taught separately and kept apart for other school activities, a practice which the inspectors said did not prepare pupils for life in modern Britain.

The school accused the inspectors of bias and irrationality in their report, particularly in their conclusion that segregating girls and boys amounted to unlawful discrimination.

It also accused Ofsted inspectors of acting unfairly because teaching girls separately had been a practice at the school for many years and yet the issue had not been raised at previous inspections.

While the judge upheld the school's argument about segregation not necessarily being discriminatory, he rejected its claim that the inspectors were biased and irrational.

In particular, the discovery of offensive literature in the library meant that Ofsted "was surely entitled to consider that the proper inference to be drawn was that there had been a significant failing of leadership and management at the school," said the judgement.

The school's submission to the High Court - which had the backing of its local authority - said publishing the original report would have caused unnecessary harm to the school and local community.

In recent months, the school has improved academically and both boys and girls achieve higher than average exam results.