French mayors do not have the right to ban burkinis, the French Council of State ruled Friday, suspending the bans already in place in a number of French cities and towns.
Arguments in France's highest administrative court this week have focused on the southern town of Villeneuve-Loubet, near Nice. But the ruling affects cities across the country.
Fifteen French towns had banned the full-length swimsuit, which covers the whole body except for the face, hands and feet.
Officials say the ban on the burkini -- worn mostly by Muslim women -- was a response to growing terror concerns.
Human rights activists argue that such measures are illegal, and that pushes to outlaw the garment are Islamophobic.
Photo sparks outrage
The bans followed a series of terror attacks in France -- including a truck rampage in Nice that killed 84, and the stabbing of an 86-year-old priest in northern France, both last month.
Earlier this week, photos of police enforcing a ban in Nice spread rapidly on social media. The images show armed officers apparently ordering a woman to remove part of her clothing.
Authorities in Nice say the officers were simply exercising their duties. Deputy Mayor Christian Estrosi denounced the photos, saying they put the officers in danger.
"I condemn these unacceptable provocations," he said.
Online and in the streets, the bans have sparked protests and criticism around the world.
In London, demonstrators created a makeshift beach Thursday outside the French Embassy for a "Wear what you want beach party."
Jenny Dawkins, a Church of England priest, told CNN she joined the protest after seeing a photo of the incident in Nice.
"I think it's a frightening image," she said. "I find it quite chilling to see an image of a woman surrounded by men with guns being told to take her clothes off."
What are France's burqa laws?
In April 2011, France became the first European country to ban wearing in public the burqa, a full-body covering that includes a mesh over the face, and the niqab, a full-face veil with an opening for the eyes.
And much like the recent burkini bans, opinion in the country is divided between those who see the laws as an infringement on religious freedom, and those who view the Islamic dress as inconsistent with France's rigorously enforced secularism.
Those breaking the law face fines of 150 euros (about $205) or public service duties.
The law was upheld by the European Convention on Human Rights in 2014 after a 24-year-old woman brought the case to court, claiming it infringed on her religious freedom.
The government also previously banned Muslim headscarves and other "conspicuous" religious symbols in French schools in February 2004.