Muslim girls must attend mixed-sex swimming lessons in Switzerland, the European Court of Human Rights (ECHR) has ruled.

The ruling from the Strasbourg-based court follows an appeal from Muslim parents, who objected to sending their young daughters – aged seven and nine – to the classes.

The two Swiss citizens, originally from Turkey, had been fined €1,300 in 2010 (£1,130 at 2017 rates) for "breach of their parental duty", leading them to take up the lawsuit.

Seven ECHR judges unanimously decided on Tuesday (10 January) that the children's integration into "local customs" took precedence over the parents' desire to exempt their children from mixed-sex swimming lessons.

The court also noted that Swiss authorities had taken steps to ease the family's concerns, such as by allowing for individual, separate showers and allowing for the wearing of a "burkini," or body-covering swimwear used by some Muslim women.

The girls' mother refused that option, arguing that "the burkini didn't erase the contours" of their bodies, and the family believed that wearing one would "stigmatise" its wearer, the ruling said.

The ECHR's ruling upheld the decision of Switzerland's federal court, which the parents appealed.

As a result, the ECHR ruled that Swiss authorities had not broken article nine of the European convention on human rights, which safeguards religious freedom.

In a written statement on the ruling, the ECHR said school played "a special role in the process of social integration, particularly where children of foreign origin were concerned".

It added: "The children's interest in attending swimming lessons was not just to learn to swim, but above all to take part in that activity with all the other pupils, with no exception on account of the children's origin or their parents' religious or philosophical convictions."