A bill banning the publication of images and videos of law enforcement officers in France has passed.

Politicians approved the bill this week - raising concern among human rights advocates and journalists.

The Global Security Bill includes a section that forbids the publication of any image or video that can be used to identify a law enforcement officer. Critics argue the law might lessen the accountability of police officers and lead to police brutality.

Politicians said they amended the bill to ensure freedom of the news media. Images are forbidden if they might lead to an officer potentially being harmed, "physically or mentally."

The bill will now head to the Senate. Prime Minister Jean Castex saw no issues with the new law as it does not "prejudice the legitimate interest of the public to be informed."

Hundreds of people gathered in the streets of Paris to protest its passing. An estimated 22,000 people reportedly took part in the demonstrations over the weekend. Some of those were members of the news media, the Yellow Vests and members of the Extinction Rebellion.

Human rights group Amnesty International said that the new law would make France an exception among world democracies. It added that not being able to film police could have serious repercussions.

"If people cannot film anything in the streets when the police may sometimes have an illegal use of force it's a very worrying message to send," Amnesty International said.

Proponents said the law is necessary to protect the country's officers. Lawmakers said several police officers had been singled out in recent years - with most being harassed on social media after their identities were made public through published images both online and in print.

Reporters Without Borders claimed the law was "too vague" and its provisions were open to interpretation. The group explained that critical news media outlets and broadcasters could end up being accused of seeking to harm police officers if they publish videos or photos.