Ten Muslim women have been apprehended by French police for wearing a burkini to the beach, with four having to pay a fine, a French official said on Wednesday.

The women were all stopped by police in Cannes where a ban on the conservative swimming attire came into place on 28 July. Six left the beach after a caution, while four were fined 38 euros ($43), a Cannes townhall spokeswoman told Reuters.

The local ban has been justified on the basis of secularism but has been widely opposed by Muslim groups calling them unconstitutional, divisive and Islamophobic.

The Conseil d'Etat, France's highest administrative court, will rule on the legality of burkini bans in coming days. France's prime minister, Manuel Valls, however on Wednesday said he opposed the burkini as an "enslavement of women" and a "provocation".

“That is not compatible with the values of France," he said in an interview with La Provence newspaper, although he fell short of backing a full national law against the swimwear.

"I support those who have taken measures [to ban burkinis]. They are motivated by the desire to encourage social unity," he said. "I don't think we should legislate on the issue. General rules on clothing restrictions cannot be a solution."

The ban in Cannes came into force after an alleged supporter of the Islamic State group drove a lorry into crowds of people in Nice, killing 85 people on Bastille Day on 14 July. It is expected to remain in force until 31 August.

"Following the attacks, the atmosphere is very tense and the burkini is seen as an ostentatious display that can threaten public order, that is why we took the measure," the spokeswoman said.

Since then, several other French towns have also enacted similar bans on the burkini.

We should ban all burqinis on the beach! Oh wait. Only the ones without oxygen tank. Or surfboard. Or... pic.twitter.com/elUpEK4wEb — Koert Debeuf (@koertdebeuf) August 17, 2016

This weekend saw a beach brawl in the Corsican village of Sisco, apparently over the burkini, with locals clashing with youths of North African origin.

Following the incident Mayor Pierre-Ange Vivoni said that he would enact a ban starting on Tuesday.

The ban, however, has thus far failed to attract support elsewhere in Europe. Italy’s interior minister, Angelino Alfano, rejected a similar ban on Wednesday.

"It doesn't seem to me, alas, that the French model has worked for the best,” he told the Corriere della Sera newspaper.