The European Court of Human Rights (ECHR) said school bosses are justified in enforcing the “full school curriculum” and children’s “succesful integration” into society.
Although the court recognised religious freedoms were being interfered with, judges said there was no violation.
The landmark case comes after two Swiss nationals, of Turkish origin, from Basel refused to send their teenager daughters to mixed swimming lessons.
The ECHR ruled there was no violation
There is no violation of Article 9 (right to freedom of thought, conscience and religion) of the European Convention on Human Rights
The parents were ordered to pay a fine of around 1,300 swiss francs (£1,100) for “acting in breach of their parental duty” after a long-running fued in 2010.
Therefore they argued this was a breach of article nine of the ECHR, which covers the religious rights.
However the ECHR held unanimously, that there had been “no violation of Article 9 (right to freedom of thought, conscience and religion) of the European Convention on Human Rights”.
Judges said the law involved was designed to “protect foreign pupils from any form of social exclusion.”
Muslim girls will have to swim with boys during swimming lessons
The 12 and 14-year-old will no longer be considered for naturalised citizenship because they refused to comply with the school curriculum, officials said.
The girls had refused to swim because of the presence of boys citing theire religion as of banning that form of interaction.
A father of another two girl was fined 4,000 swiss francs (£2,900) at a county court for refusing to let his daughters swim with boys.
Switzerland was branded “racist” after 60 per cent of Swiss citizens voted in 2009 “against the construction of minarets” – the towers that deliver the call to prayer on either side of mosques – in the country.
The court added: “Accordingly, the children’s interest in a full education, thus facilitating their successful social integration according to local customs and mores, prevailed over the parents’ wish to have their children exempted from mixed swimming lessons.”