Switzerland has won a case to make it mandatory for Muslim parents to send children to mixed swimming lessons.
The European Court of Human Rights (ECHR) found there was no violation of the freedom of thought, conscience and religion.
The applicants were two Swiss nationals of Turkish origin who had refused to send their daughters, aged under 11 at the time, to mixed swimming lessons as part of the school curriculum.
Despite mediation attempts by the Basel school, the mothers continued to refuse and in 2010 were collectively fined 1292 euros (NZ$1953) for acting in breach of their parental duty.
The mothers appealed the decision, arguing it violated article nine of the European Convention of Human Rights.
In court on Tuesday, ECHR said authorities were justified in giving precedence to enforcing "the full school curriculum" and the children's "successful integration" into society.
The school spoke about the importance of the role that schools play in social integration, particularly for "children of foreign origin".
It also noted that those involved had made very flexible arrangements, such as allowing the daughters to wear burkinis, to avoid imposing on their religious beliefs.
However the EHCR acknowledged the refusal to grant them an exemption from swimming lessons had interfered with their freedom of religion.