PARIS — The mayor of the French resort city of Cannes has barred women in full-body, head-covering swimsuits from bathing on public beaches there, essentially demanding that they either wear swimsuits that reveal more skin or stop going to the beach. The ban has elicited protests by French Muslims who say it is discriminatory.

That the debate is occurring on the Riviera, a vacation destination on the Mediterranean but also an anxious region after the terrorist attack on a Bastille Day celebration in the nearby seaside city of Nice, has only added to the controversy.