France's highest administrative court has suspended a ban on full-body "burkini" swimsuits that was imposed in a town on the Mediterranean coast.
The ban in Villeneuve-Loubet "seriously and clearly illegally breached fundamental freedoms", it found.
The ruling could set a precedent for up to 30 other towns that imposed bans on their beaches, chiefly on the Riviera.
At least three mayors have already said they will keep the bans in their towns.
The court will make a final decision later on the bans' legality.
Correspondents in France say the court's decision means that all the bans on burkinis are likely now to be overturned,
But town hall authorities in Nice and Frejus, as well as in the Corsican village of Sisco, have vowed to keep the bans in place.
A human rights group, the Human Rights League (LDH), and an anti-Islamophobia association (CCIF), brought the ban in Villeneuve-Loubet to the court's attention.
Patrice Spinosi, a lawyer for the LDH, said outside court that people who had been fined could claim their money back.
But the town's mayor, Lionnel Luca, said: "We need to decide if we want a smiley, friendly version of sharia law on our beaches or if we want the rules of the [French] Republic to be implemented."
Amnesty International welcomed the court's decision. The human rights group's Europe director, John Dalhuisen, said it had "drawn a line in the sand".
He said: "French authorities must now drop the pretence that these measures do anything to protect the rights of women.
"These bans do nothing to increase public safety but do a lot to promote public humiliation."
On Thursday, Prime Minister Manuel Valls described the burkini as "a political sign of religious proselytising".
The French Republic was "not at war with Islam", he argued, but "protecting [Muslims] against discrimination".
The burkini bans have ignited fierce debate in France and worldwide.
Opinions polls suggested most French people backed the bans, which town mayors said were protecting public order and secularism.
Muslims said they were being targeted unfairly.
The "burkini bans" actually make no mention of the burkini.
The rules simply say beachwear must be respectful of good public manners and the principle of secularism.
The controversy intensified after pictures and video of police appearing to enforce the ban by making a woman take off an item of clothing prompted widespread anger.
The court said local authorities did not have the power to restrict individual liberties in this way without "proven risk" to public order.
What is a burkini?
- A burkini is a full-body swimsuit that covers everything except the face, hands and feet
- The name is a mix of the words "burka" and "bikini"
- Unlike burkas, burkinis leave the face free
- Burkinis are marketed to Muslim women as a way for them to swim in public while adhering to strict modesty edicts
- The French bans have referred to religious clothing and as they were loosely phrased, came to be understood to include full-length clothing and head coverings worn on the beach - not just burkini swimsuits
Why have the bans been imposed?
After a militant Islamist ploughed a lorry into families on the seafront at Nice on 14 July, killing 86 people, the city's authorities said a ban was "a necessity".
Local leaders have described their actions as appropriate and proportionate.
But the bans are not just a response to a spate of deadly jihadist attacks on French soil. France has long-standing laws on secularism, and the Nice ban focused on "correct dress, respectful of accepted customs and secularism, as well as rules of hygiene and of safety in public bathing areas".
What French law says on secularism and religious clothing
- In 2010, France became the first European country to ban the full-face veil in public
- A 2004 law forbids the wearing of religious emblems in schools and colleges
- The 1905 constitution aims to separate Church and state. It enshrines secularism in education but also guarantees the freedom of religion and freedom to exercise it. The original text made no reference to clothing