Switzerland has won a European Court of Human Rights (ECHR) case allowing it to force Muslim parents to send their daughters to mixed school swimming lessons.

Swiss, Swedish, Spanish, Serbian and Slovakian judges were among the panel of seven judges who delivered the ruling, which found that although freedom of religion had been “interfered with”, the move was legitimate as it was “seeking to protect foreign pupils from any form of social exclusion”.

They were ruling on a legal challenge brought by two Swiss-Turkish parents from Basel, who refused to send their daughters to mixed swimming lessons on the grounds “that their beliefs prohibited them from allowing their children to take part”.

Education officials in the canton of Basle Urban advised the couple they could be fined up to 1,000 Swiss francs (£813) each but despite mediation attempts by the girls’ school, they continued not to attend the compulsory classes.

The parents were ordered to pay a total fine of £1,138 for “acting in breach of their parental duty”.

The Basel court of appeal dismissed their claim the following year, and another appeal was thrown out by Swizerland’s federal court in 2012.

The couple then lodged their case with the ECHR, alleging that the requirement to send their daughters to mixed swimming lessons violated Article 9 of the European Convention on Human Rights.

The ECHR unanimously threw out their complaint, finding there had been no violation of freedom of religion, and that Switzerland’s right to facilitate “successful social integration according to local customs and mores” took precedence over parents’ wish to refuse.

“The Court observed that school played a special role in the process of social integration, and one that was all the more decisive where pupils of foreign origin were concerned,” a statement said.

“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.”

Judges found that the classes were important for child development and health and should not be governed by parents’ religious convictions, adding that the claimants had refused offers by local authorities for their daughters to wear ‘burkinis’ for the lessons and ensure they changed with no boys present.

The Chamber judgement is not final and may be referred to the ECHR’s Grand Chamber by any party’s request over the next three months.

Germany’s highest court made a similar ruling in December, rejecting an appeal by parents who argued that their 11-year-old daughter should be excused from swimming classes.