Lionnel Luca, the mayor of Villeneuve-Loubet, said: "This decision, far from pacifying, will serve only to heighten tensions which will carry risks of trouble which we wanted to avoid."
He argued that the judgment was inconsistent as another Riviera town, Mandelieu-la-Napoule, introduced an identical ban in 2013 that was never contested.
"Rampant Islamism has been gaining ground. With this ruling it has gained some more," Mr Luca added.
He said he would comply with the ruling, but other local authorities, including the mayor of Sisco, in Corsica, vowed to maintain their bans.
"This judgment does not affect us here because we had a fight over it [the burkini]," said Ange-Pierre Vivoni, referring to a brawl on a beach in Sisco on August 13 which preceded the ban.
Mayors who contest the ban will be backed by Nicolas Sarkozy, the former conservative president who introduced France's ban on the Islamic full-face veil five years ago.
He demanded a nationwide burkini ban this week, placing Islam, immigration and security at the heart of his campaign to win back power from the Socialists in elections next year.
An ally of Mr Sarkozy, Guillaume Larrivé, said: "We support 100 per cent the mayors who introduced bans."
He said parliament could still pass a law banning the burkini, which a poll suggested would be backed by two-thirds of French people.
Florian Philippot, deputy leader of the far-Right Front National, accused Mr Sarkozy of "poaching ideas from the FN to dupe our voters into backing him".
Support for the bans is not confined to the Right.
The Socialist prime minister, Manuel Valls, has described the burkini as a "symbol of the enslavement of women" unacceptable under France's secular constitution.
"Denouncing the burkini is not jeopardising an individual freedom. There is no freedom that locks up women! It's denouncing a deadly, backward Islam," he wrote on his Facebook page on Friday.
However, opponents of the bans, who include the Moroccan-born education minister, Najat Vallaud-Belkacem, have argued that they only served to fuel a racist political agenda as the election campaign kicks off.
The court's decision was welcomed by the French Muslim Council, which described it as a "victory for the law and wisdom ... that should make it possible to reduce tension".
Feiza Ben Mohamed of a Muslim group based in Nice said it "gives Muslim women back their dignity".
Asked if it meant burkini-clad women would throng the town's beach, she laughed and said: "There were hardly any there before the ban so I don't see why they should turn up there now."
There was outrage in Britain and around the world after photographs emerged showing armed police apparently compelling a woman on a beach in Nice to remove a long-sleeved top - although she was not in a burkini.
Mayors of the towns that prohibited the Islamic swimsuit justified the bans on the grounds of public order and safety, hygiene or secularism.
Religion and public life are strictly separated in France, which was the first European country to ban the Islamic full-face veil in 2011.
However, few women in France wear the veil or the burkini, and only two towns, Nice and Cannes, have fined women for wearing it.
Amnesty International praised the court's 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," said John Dalhuisen, its Europe director.
Critics compared the enforcement of the ban to repression in Saudi Arabia and Iran, where religious police enforce strict dress codes on women.
Some rights groups have said the new bans amounted to "collective punishment" of Muslims after the terror attacks amid growing friction over immigration.
Terrorism analysts warned that the bans were feeding jihadist propaganda and could help Isil recruit new members.
Marine Le Pen, leader of the FN, described the court's ruling as "obviously regrettable but not surprising."
She urged parliament to vote to ban the burkini "in order to protect women, secularism and our way of life."
With the exception of the prime minister, the ruling was welcomed by the Socialists.
Razzy Hammadi, the party spokesman, said he hoped it would "put an end to this nasty controversy".