French President Emmanuel Macron is backing away from plans to make it harder to film the police after footage of officers attacking a Black man prompted outrage at mass protests over the weekend.

The government has decided to rewrite the controversial section of a new security law following the demonstrations in major cities across the country, said Christophe Castaner, head of Macron's ruling party in the parliament. "We know that doubts still exist" and "we must listen to those doubts," Castaner said at a news conference Monday. "When such a misunderstanding continues to intensify on such a fundamental subject, we have a duty to collectively question ourselves."

Article 24 of the "global security law" would make it a crime punishable by a year in prison and a $54,000 fine to publish the face or any other identifying feature of a police officer with intent to cause them "physical or psychological harm."

Castaner said that provision will be entirely redrafted, while insisting that the aim remains to better protect the police both for professional journalists and for citizens posting images on social media.

The retreat is a blow to Macron's party, which pushed for the legislation as part of a drive to improve security and crack down on crime. The protests on Saturday drew huge crowds — as many as 300,000 by some estimates. Though largely peaceful at the start, violence broke out in pockets later in the day, with groups of individuals dressed in black attacking police and reports of officers beating protesters.

Macron has been trying to position himself as the law and order candidate in a country where campaigning for presidential elections in two years has already begun.

In the immediate aftermath of the Oct. 16 beheading of a teacher, he saw a bounce the polls, but enthusiasm for his tough stance was short lived, and Macron is now under fire on multiple fronts as he tries to respond to the resurgence of jihadism and contain the coronavirus spread.

Anger over thein weekend was fueled by a video showing police officers beating Black music producer Michel Zecler in his Paris studio and shouting racial slurs during a violent arrest. Just days earlier, other videos showed officers forcefully dismantling a migrant camp, also in the French capital.

For many, those videos are symbolic of a larger problem, and opponents of Article 24 say it would allow such police brutality to go unchecked. Macron and his hard-line Interior Minister Gerald Darmanin have repeatedly denied systemic racism with the security forces.

Three police officers were charged late on Sunday, with two of them placed in custody while the investigation continues into the alleged assault of Zecler. In his comments on Monday, Castaner said, "France should be the country of no violence or any infringement of any freedom whatsoever."