The mayor of Cannes in southern France has banned full-body swimsuits known as "burkinis" from the beach, citing public order concerns.
David Lisnard said they are a "symbol of Islamic extremism" and might spark scuffles, as France is the target of Islamist attacks.
France is on high alert following a series of incidents including July's truck attack in nearby Nice.
Anyone caught flouting the new rule could face a fine of €38 (£33).
They will first be asked to change into another swimming costume or leave the beach.
Nobody has been apprehended for wearing a burkini in Cannes since the edict came into force at the end of July.
This is not the first time that women's clothing has been restricted in France. In 2011 it became the first country in Europe to ban the full-face Islamic veil, known as the burka, as well as the partial face covering, the niqab.
Earlier this week a private waterpark near Marseille cancelled a burkini-only day after being subjected to criticism.
"Access to beaches and for swimming is banned to any person wearing improper clothes that are not respectful of good morals and secularism.
"Beachwear which ostentatiously displays religious affiliation, when France and places of worship are currently the target of terrorist attacks, is liable to create risks of disrupting public order."
The reaction in the French press
The French media has questioned the legality of the ban. Le Monde points out that no French law bans the wearing of full-body swimsuits. "The law on the full-face veil only bans covering the face in public... The burkini, which covers the body but does not hide the face, is thus a totally legal garment."
France TV Info's legal blog, Judge Marie, says the risk of disturbing public order, invoked by the Cannes mayor, seems rather tenuous. "The basic freedom to come and go dressed as you please seems to me to be infringed in a way that is disproportionate to this risk," the blog says.
Meanwhile, a commentary in left-of-centre paper Liberation accuses the Cannes mayor of trying to score a political point: "David Lisnard… is not responding to a specific issue, but is sending a radical message to his constituents, to his electorate."
Mr Lisnard confirmed to local media that other religious symbols such as the kippah (Jewish skullcap) and the cross would still be permitted, and the ban would not apply to the veil that some Muslim women wear over their hair.
He said: "I simply forbid a uniform that is the symbol of Islamic extremism.
"We live in a common public space, there are rules to follow. "
The League of Human Rights (LDH) said it would challenge the ban in court.
"It is time for politicians in this region to calm their discriminatory ardour and defend the spirit of the Republic," local LDH leader Herve Lavisse said.
The Collective Against Islamophobia in France (CCIF) is also expected to mount a legal challenge against the decision. Its lawyer Sefen Guez Guez called the ban "illegal, discriminatory and unconstitutional".