A court in Germany has ruled that a Muslim schoolgirl should take part in mixed-sex swimming lessons.
Her parents had insisted that the girl, 13, not take part in swimming lessons at her school in Frankfurt.
Some Muslim parents say that such lessons run contrary to Islamic principles of modesty.
However, the judge in the case said the girl could wear an all-over swimming garment sometimes dubbed a "burkini" in order to accommodate her beliefs.
Some Muslim girls already wear the garment to take part in lessons.
However, others reject that solution, saying that the garment is clumsy but also that it is unacceptable for Muslim girls to be in close proximity to boys clad only in swimming trunks, the BBC's Stephen Evans reports from Berlin.
The judges in Germany's Federal Administrative Court ruled that "the basic right to religious freedom does not... provide for any demand not to be confronted at school with the behavioural habits of third parties - including those pertaining to clothing".
The judges went on to point out that such "habits" were widespread in Germany in the summer months.
The lawyer for the girl's family had said that there was already segregation of gym lessons in some Catholic areas.
There are also some secular gyms in Germany which have special segregated areas reserved for women to exercise.
The family who brought the case in question are from Morocco, the German magazine Der Spiegel reports, which adds that the girl had done well academically since joining the school.