The European Court of Human Rights upheld the decision of a Swiss court instructing a Muslim couple to allow their daughters to take part in swimming lessons, Reuters reported on Tuesday. Sport is a part of obligatory activity in Switzerland schools.

The couple of Turkish nationality were fined 1,400 Swiss francs in 2010 for failure to respect schooling rules. The parents then moved the European rights court to fight the ruling, where they alleged that the directive imposed by the school violated their right to freedom of thought, conscience and religion as per Article 9 of the ECHR.

However, the ECHR seven-member bench on Tuesday unanimously ruled that the girls’ integration into “local customs” was more important than parents’ desire to exempt their children from mixed-sex swimming lessons, reported The Guardian.

The court also noted that authorities had tried to make the swimming lessons more acceptable for the girls’ parents, according to The Guardian. The school had apparently said the girls would be allowed to attend classes in burkinis, and would be able to change their outfit separately. The ECHR, acknowledging that the requirement was an interference with the freedom of religion, said school played a major role in social integration, especially for children of foreign origin, Al Jazeera reported.