In barely a fortnight, a French Riviera mayor's decision to ban burkinis -- full-body swimsuits -- blew up into a major controversy dividing public opinion at home and abroad.

Following are key dates in the political and legal battle over the ban.

Banned in Cannes

August 11: The mayor of Cannes bans access to its famed beaches "to anyone who does not have (bathing apparel) which respects good customs 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," his order said.

The ban -- setting a 38-euro ($43) fine for Islamic beachwear -- followed the death of 86 people in nearby Nice on July 14 when a truck ploughed into a crowd in an attack by the so-called Islamic State. On July 26, a priest was killed in his northwestern French church by two men who had pledged allegiance to IS.

READ: France's top court suspends burkini ban

'Hygiene','safety'

August 13: A second Riviera resort, Villeneuve-Loubet, bans burkinis, citing hygiene and safety as well as public order and religious considerations.

Commenting on a couple "where the wife was swimming fully dressed," mayor Lionnel Luca says: "I considered that unacceptable for hygienic reasons."

The same day Cannes wins court backing for its ban after a challenge by a group fighting Islamophobia. The court says it is legal under French law to forbid people from "invoking their religious beliefs to skirt common rules regulating relations between public authorities and private individuals".

Beach brawl

August 13: A massive beach brawl erupts on the French island of Corsica between locals and French Muslims after tourists took pictures of women swimming in burkinis.

Bottles and stones were hurled, with five people injured and three cars torched in the clashes, and scores of police rushed in to restore order. The mayor of the small town of Sisco where the brawl broke out later announces France's third ban on the swimsuit.

Within a fortnight, local authorities in some 30 towns had announced burkini bans.

PM's blessing but anger grows

August 16: Socialist Prime Minister Manuel Valls says "I understand mayors who, at this time of tension, respond by looking for solutions, by avoiding disturbances to public order."

"I therefore support those who have passed (burkini) decrees... Beaches, like all public areas, must be protected from religious claims. The burkini is not a new range of swimwear, a fashion. It is the expression of a political project, a counter-society, based notably on the enslavement of women."

Three more resorts, two of them on the north coast, announce plans to ban the full-body Islamic swimming garment.

Growing anger over the issue is further inflamed 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 mayor's office denied she was forced to remove clothing.

There were protests in London and the first signs of division within the government. Education Minister Najat Vallaud-Belkacem said the "proliferation" of burkini bans "was not a welcome development" and said there seemed to be no link between terror attacks "and what a woman wears on a beach".

Top court suspends ban

August 26: Ruling on a challenge by the Human Rights League and an anti-Islamophobia group, France's highest administrative court, the State Council, suspends the Villeneuve-Loubet ban in a judgement expected to set a precedent.

It says local authorities can only restrict individual liberties if wearing the Islamic swimsuit is a "proven risk" to public order. A court in Nice had upheld the Villeneuve-Loubet ban just days earlier.