Switzerland has won a case at the European Court of Human Rights (ECHR) obliging Muslim parents to send their children to mixed swimming lessons.
It said authorities were justified in giving precedence to enforcing “the full school curriculum” and the children’s “successful integration” into society.
The ECHR acknowledged that religious freedom was being interfered with.
But judges said it did not amount to a violation.
The case was brought by two Swiss nationals or Turkish origin who refused to send their teenage daughters to the compulsory mixed lessons.
Education officials, however, said that exemptions were available only for girls who had reached the age of puberty – which the girls had not reached at the time.
In 2010, after a long-running dispute, the parents were ordered to pay a fine of almost €1,300 (£1,100) “for acting in breach of their parental duty”.
They argued that such treatment was a violation of article nine of the European Convention on Human Rights, which covers the right to freedom of thought, conscience and religion.
In a statement, the EHCR said the refusal to exempt the girls “had been an interference with the applicants’ right to their freedom of religion”.
But it also said the law involved was designed to “protect foreign pupils from any form of social exclusion.”
The court said Switzerland was free to design its education system “according to their needs and traditions.”
Schools, it said, played an important role in social integration, and exemptions from some lessons are “justified only in very exceptional circumstances”.
“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,” the court said.