The Court of Appeal overturned a High Court ruling to find that the Al-Hijrah school, in Birmingham, was acting unlawfully in contradiction to the 2010 Equality Act.
Education regulators with the Office of Stanards in Education (Ofsted) cheered the ruling, promising to look into other schools that had educational models akin to Al-Hijrah's.
Ofsted's job is to make sure that all schools properly prepare children for life in modern Britain.
In their 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".
Girls and boys have separate classes, are banned from mixing at lunchtime or during any activities and use separate corridors.
Both girls and boys between four and 16 attend the school in Bordesley Green and while they mix in the early years, they are completely separated from Year 5 onwards.
Today's ruling relates to mixed-sex schools only, and therefore does not impact single-sex schools.
It was also reported that inspectors found "offensive" books in the school's library that advocated wife beating and forced sex - local media reported.
After an inspection past year, Ofsted had ruled that Al- Hijrah was "inadequate" and it was put in "special measures", saying its policy of separating the sexes was discrimination under the 2010 Equality Act.
"This is discrimination and is wrong".
Following the ruling Ofsted's chief inspector Amanda Spielman said she was "delighted that we have won this appeal".
Inspectors found the Birmingham school had left pupils "unprepared 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".
During the appeal hearing, Al-Hijrahs interim executive board had claimed that boys and girls at the school were treated entirely equally despite the segregation, which was attributed to religious reasons.
Ms Spielman said Ofsted will be "considering the ruling carefully to understand how this will affect future inspections".
"While we may not all agree with their practices, as is made clear in the judgement there are many other faith schools around the country that practice gender separation, none of which have been downgraded by Ofsted because of this".
Beetlejuice 2 Resurrected With New Writer
The sequel to 1988's Beetlejuice is moving forward with a new name in place to pen the film's script. It was also rumored a year ago that Johnny Depp could replace Michael Keaton in the title role.
Macalester grad's 'Jeopardy' streak comes to an end
Austin Rogers, a bartender from NY , came in a close second place on the fan-favorite game show after a 12-day run as champion. According to Rogers, he and Trebek became rather friendly, and the host even let the contestant call him "dude".
Challenges and Opportunities for PG&E Corporation (PCG)
The Company's primary operating subsidiary is Pacific Gas and Electric Company, which operates in northern and central California. Investors may be interested in viewing the Gross Margin score on shares of California Resources Corporation (NYSE:CRC).