Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

France's top court on Friday suspended a controversial ban on full-body burkini swimsuits that has sparked heated debate both inside the country and abroad.

Several French towns and cities barred burkinis — worn primarily by Muslim women — from their beaches this summer, with officials arguing the garments were a risk to public order after several terrorist attacks across Europe. This prompted an outcry from religious groups who called the moves discriminatory and illegal.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

On Friday, the Council of State suspended the ban in one of these towns, Villeneuve-Loubet, after a request from the French League of Human Rights.

"There is no evidence that safeguarding peace and good order on the beaches had been jeopardized because some swimmers were wearing certain types of clothes," the ruling said. It added that the ban "seriously infringed, in a manner that was clearly illegal, fundamental liberties such as the freedom to come and go, religious freedom and individual freedom."

A Muslim woman wears a burkini on a beach in Marseille, France, on August 17. STRINGER / Reuters

The debate over the so-called "burkini ban" hit fever pitch this week when images circulated online showing armed policemen surrounding a Muslim woman and forcing her to take off her tunic — not a burkini. The hashtag #BurkiniBan took Twitter by storm, with people around the world weighing in on the debate.

Lawmakers said they hoped the decision regarding Villeneuve-Loubet would set a precedent for other areas.

"Logically the mayors should withdraw these ordinances. If not legal actions could be taken against those towns," Patrice Spinosi, a lawyer representing the Human Rights League, told The Associated Press on Friday. "They violate fundamental liberties and they should be withdrawn."

However, the mayor of one town told BFM-TV he would not be lifting his ban. "I won't withdraw it," Sisco Mayor Ange-Pierre Vivoni told the station.

Under French law, temporary decisions are handed down by the court while it takes time to make a full judgement, according to Reuters.