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".
Celebrities Who Suffer With Chronic Diseases
Now if that isn’t the epitome of what a BFF is, I don’t know what is! Selena continues to be on chronic medication. There is also a huge list of celebrities past like famous painter vincent Van Gogh who suffered with this disease.
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".
How major United States stock indexes fared on Friday
Higher gas prices contributed to the jump in retail sales , as sales by gasoline stations soared by 5.8 percent during the month. The Labor Department said USA producer prices rose 0.4 percent last month and 2.6 percent in the 12 months through September.