Prominent French electro house music producer The Avener hosted the set organised by the municipality late Saturday in his home city, with crowds massing on central Nice's famous Promenade des Anglais esplanade.
The density of the crowd as people danced the night away provoked fury on social media at a time when France is wary of a second wave of the coronavirus pandemic.
“We regret that these rules have not been sufficiently respected,” mayor Christian Estrosi wrote on Twitter.
He said the city would ask the government to review national rules to make it obligatory to wear a mask at such events, even outside.
“In Nice, it will now be mandatory for all our events,” he added. All those attending events indoors such as concerts already must wear masks.
The municipality insisted that the maximum number of 5,000 people allowed at any gathering in France had not been exceeded, even in an area that in usual times can accommodate 36,000.
An AFP photographer said the crowds were denser in some areas as people sought to get closer to the loudspeakers due to poorer sound quality elsewhere.
The municipality insisted that clear written warnings on social distancing had been put up as well as audio and video messages urging people to be prudent.
Government spokesman Gabriel Attal said the controversy over the event underlined the need for people to take care, even if current infection rates remained low.
“The French have gone through difficult times with the lockdown, they want to go out but going out does not mean forgetting these rules,” he told BFM-TV.