PARIS — It's about much, much more than swimwear.

The highest administrative court in France on Friday suspended a Mediterranean beach resort's ban on full-body bathing suits — often called burkinis — in a closely watched ruling likely to set a legal precedent across the country.

The court declared that banning the body-concealing bathing apparel sometimes worn by observant Muslim women went against fundamental civil liberties.

More than two dozen French towns have adopted a similar prohibition — a chain reaction that sprang up in the weeks after a devastating truck rampage in the Riviera resort city of Nice on July 14, Bastille Day, which left 86 dead and hundreds injured.

In France, home of Europe's largest Muslim community, the bans have touched a social and cultural nerve, triggering debate turning on national identity, security fears, immigration, women's rights and the social role of religion, among other questions.

Most of the municipal bans cited the threat to public order as a concern; the court ruled that the existence of such a threat had not been established — and that in its absence, the prohibition could not be legally justified.

Friday's ruling was limited in scope, affecting only the ban in the Mediterranean town of Villeneuve-Loubet — an opening salvo in what is likely to be a drawn-out legal and political fight.

But despite the court victory, the debate was unlikely to go away.

Prime Minister Manuel Valls, who supported the bans, called the debate “fundamental” for secular France, where religious displays are unwelcome in the public space.

Valls wrote on his Facebook page that denouncing the burkini “in no way puts into question individual freedom” and is really about denouncing “fatal, retrograde Islamism.” The burkini, he wrote, “is the affirmation of political Islam in the public space.”

The mayor of Villeneuve-Loubet, Lionnel Luca, denounced the ruling, saying it would inflame passions rather than calm them.

But opponents of the swimwear restrictions hailed the decision.

Abdallah Zekri, president of the National Observatory against Islamaphobia, called it a “victory for the law and for wisdom.”

Stephane Dujarric, a spokesman for U.N. Secretary-General Ban Ki-moon, welcomed the ruling as a sign of “respect for personal dignity.”

White House spokesman Josh Earnest said he was reluctant to “second-guess” an ally's internal debate about security.

Still, Earnest said the U.S. was founded as a country where people “could observe their religious faith, and worship God without the fear of persecution or even intrusion by government authorities.”

He said President Barack Obama “believes strongly in the freedom of religion” and believes protecting that freedom strengthens national security.

This week, photos of a woman in a headscarf and long tunic on a Riviera beach, surrounded by armed police and apparently being ordered to shed a long-sleeved covering, touched off an online firestorm.

Police officials denied their officers had asked her to remove any clothing, but the widely shared photo drew expressions of disapproval and incredulity from outside France, propelling the issue into the international spotlight.

Some supporters of the ban say traditional Muslim standards of dress, including headscarves and face veils, are a means of oppressing women; many Muslim women have retorted that they alone should have the right to decide whether to cover up.

One of the groups that brought the case before the court, the Human Rights League, says other municipalities must also accept Friday's decision.

The court, known as the Council of State, asserted that banning the swimwear “seriously and clearly illegally” violated freedom of belief and individual liberties.

“It is a decision that is meant to set legal precedent,” said lawyer Patrice Spinosi, according to The Associated Press.

Several municipalities besides Villeneuve-Loubet also signaled defiance, suggesting that women in burkinis would continue to face fines.

Special correspondent Kim Willsher reported from Paris and Los Angeles Times' Laura King from Washington. The Associated Press also contributed.

laura.king@latimes.com