An Islamic faith school has lost its High Court bid to overturn a watchdog report condemning it as "inadequate" and placing it in "special measures".

A judge ruled there were "concerns" over School X entitling Ofsted to take action.

But Mr Justice Jay, sitting in London, rejected Ofsted's criticism of the school's policy for the segregation of boys from girls on the grounds of sex discrimination.

The judge said there was no evidence that segregation in School X "particularly disadvantages women".

Because of the public importance of the case, he gave both Ofsted and the school's interim executive board permission to appeal against his ruling to the Court of Appeal.

The judge said the concerns justifying Ofsted's actions included the discovery of "offensive books in the school library which clearly do treat women as subordinate to men".

James McNeillie, Ofsted's lead inspector at the school, had reported the books, published between 1993 and 2009, "contained views which are inimical to fundamental British values", said the judge.

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`.

One of the offensive books was prominently displayed in the library, said the judge, but it was apparent to Mr McNeillie that the head teacher was not aware that the books were available and "to be fair to him said their content was `abhorrent`".

Inspectors were told that, after an earlier inspection, unsuitable texts had been removed.

However the judge declared: "In my judgment it is obvious that leaders at the school conspicuously failed in allowing these books to enter, or re-enter, the library and the report's assessment to that effect cannot be impugned."