JERUSALEM — Recording or taking unauthorized pictures of Israeli soldiers clashing with Palestinians could soon bring criminal charges and penalties, if legislation proposed by members of Prime Minister Benjamin Netanyahu’s hawkish coalition is enacted into law.

On Sunday, the Israeli government endorsed the proposal, which seeks to criminalize the filming and/or distribution of images and video footage showing certain Israeli military operations — if the aim is “hurting a soldier’s spirit” or “harming national security.” A conviction for such crimes could carry prison terms of five to 10 years.

[Israeli NGOs decry ‘deeply anti-democratic move’ as new law approved]

The legislation, which must be approved by parliament, appears to be an attempt by the government to curb left-wing organizations critical of Israel’s ongoing military occupation and its treatment of Palestinians. Many of the groups rely on amateur video footage to hold Israel accountable for its treatment of Palestinians.

The bill comes after a wave of incriminating videos showing troops abusing and, in some cases, killing Palestinians that have gone viral on social media or been featured in the mainstream media.

[After a killing, an Israeli soldier and an Arab family confronted justice]

In one such case, an Israeli soldier was caught on film fatally shooting an already neutralized Palestinian militant in Hebron. Soldier Elor Azaria was later put on trial and convicted of manslaughter by a military court.  Footage taken by a photographer working with the human rights organization B’Tselem formed the core of the evidence against him. Azaria served nine months in prison and was released last month.

The legislation has been drafted by Knesset member Robert Ilatov, a member of the right-wing Yisrael Beiteinu party. The bill's introduction says such videos have become far too commonplace.

“For many years, the State of Israel has witnessed a worrisome phenomenon in which Israeli soldiers are being documented via video, still photography and audio recordings by anti-Israeli and pro-Palestinian groups,” reads the bill’s opening statement.

It cites a handful of Israeli human rights groups, as well as those involved in the boycott, divestment and sanctions movement (BDS) against Israel.

[A Palestinian protester was shot by an Israeli sniper. One celebrating soldier called it a ‘legendary clip.’]

“In many instances, these organizations spend entire days standing near soldiers waiting with bated breath for some action that they can document in a biased way in order to slander the army. Such documentation generally interferes with ongoing and operational duties, sometimes accompanied by insults shouted at them,” reads the bill.

Guy Camelmacher, Ilatov's spokesman, said the goal was to stop pirate video footage taken by people whose intentions and financial backing were unclear.

“Things need to be regulated. It can’t be that anyone is able to film soldiers or shove a camera in their faces just to shame them,” he said.

Camelmacher said the legislation would not affect mainstream journalists working in the field, who often need prior approval to film military operations or have their material screened by a military censor.

“The army has an orderly working environment vis-a-vis journalists, whether that’s via the military censor or through the army spokesperson,” he said.

Amit Gilutz, a spokesman for B’Tselem, one of the organizations identified as problematic in the bill, said the group was unperturbed by the legislation.

“If the government finds the occupation too embarrassing to even be visibly documented, it should work to bring it to an end — not go after photographers. Either way, the documentation of this reality will continue, regardless of this or other draconian pieces of legislation,” he said.