France's highest administrative court on Friday suspended a controversial ban on the burkini by a French Riviera town after it was challenged by rights groups.
In a judgement expected to set a precedent, the State Council ruled that local authorities could only restrict individual liberties if wearing the Islamic swimsuit was a "proven risk" to public order.
The judges said there was no such risk in the case before the court concerning Villeneuve-Loubet, one of around 30 towns to have introduced the bans.
The French Council of the Muslim Faith (CFCM) hailed the ruling as a "victory for common sense".
Police have fined Muslim women for wearing burkinis on beaches in several towns, including in the popular tourist resorts of Nice and Cannes, sparking controversy in France and abroad.
The burkini bans have triggered a fierce debate about women's rights and the French state's strictly-guarded secularism.
'Line in the sand'
Amnesty International welcomed the ruling.
"By overturning a discriminatory ban that is fuelled by and is fuelling prejudice and intolerance, today's decision has drawn an important line in the sand," Amnesty's Europe director John Dalhuisen said.
"French authorities must now drop the pretence that these measures do anything to protect the rights of women," he said.
The CFCM's secretary general Abdallah Zekri said: "This victory for common sense will help to take the tension out of a situation which has become very tense for our Muslim compatriots, especially women."
The State Council heard arguments from the Human Rights League and an anti-Islamophobia group.
A court in Nice had upheld the Villeneuve-Loubet ban this week.
President Francois Hollande said Thursday that life in France "supposes that everyone sticks to the rules and that there is neither provocation nor stigmatisation".
Anger over the issue was further inflamed this week when photographs in the British media showed police surrounding a woman in a headscarf on a beach in Nice as she removed a long-sleeved top.
The office of Nice's mayor denied that the woman had been forced to remove clothing, telling AFP she was showing police the swimsuit she was wearing under her top, over a pair of leggings, when the picture was taken.
Prime Minister Manuel Valls on Thursday condemned any "stigmatisation" of Muslims, but maintained that the burkini was "a political sign of religious proselytising".
"We are not at war with Islam… the French republic is welcoming (to Muslims), we are protecting them against discrimination," he told BFMTV.
But in a sign of the divisions within the Socialist government on the issue, Education Minister Najat Vallaud-Belkacem said the "proliferation" of burkini bans "was not a welcome development".
Vallaud-Belkacem, who is of Moroccan origin, took issue with the wording of the ban in Nice which linked the measure to the jihadist truck attack in the resort last month in which 86 people were killed.
"In my opinion, there is nothing to prove that there is a link between the terrorism of Daesh and what a woman wears on a beach," she said, using another term for Islamic State.
But Valls contradicted his minister's claims, saying the bans were necessary to maintain "public order".
'No legal justification'
The administrative court in Nice ruled Monday that the Villeneuve-Loubet ban was "necessary" to prevent "public disorder" after the Nice attack and the murder of a Catholic priest by two jihadists in northern France.
But in its ruling, the State Council said: "In the absence of such risks, the emotion and the concerns arising from terrorist attacks, especially the attack in Nice on July 14, are not sufficient to legally justify a ban."
The so-called burkini bans never actually mention the word burkini, although they are clearly aimed at the garment which covers the hair but leaves the face visible and stretches down to the ankles.
The vague wording of the prohibitions has caused confusion.
Apart from the incident in the photographs in Nice, a 34-year-old mother of two told AFP on Tuesday she had been fined on the beach in the resort of Cannes wearing leggings, a tunic and a headscarf.
France was the first European country to ban the wearing of the Islamic face veil in public in 2010.