Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

TEL AVIV — A young Israeli soldier was found guilty Wednesday of “needlessly” killing a Palestinian assailant in a shooting that was captured on video and caused a bitter division in public opinion.

A military court ruled that Sergeant Elor Azaria, 20, shot the attacker because he wanted him dead and not because he was posing a threat.

The killing, which came amid a wave of Palestinian stabbings, was filmed by a human rights activist and drew international attention.

The shooting was captured on video.

Supporters of Azaria, who was 19 at the time of the March 24 incident, shouted and waved flags outside a military court as a panel gave its verdict. Scuffles erupted between the protesters and the security forces, leading to at least three arrests.

As she read the verdict, judge Col. Maya Heller systematically rejected all of the points of Azaria’s, saying the Palestinian was shot “needlessly.”

Many citizens, right-wing politicians and some celebrities had rallied behind Azaria, saying he was being made a scapegoat and should be let off lightly.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

They said his actions were justified by the barrage of Palestinian violence and the general atmosphere of alarm in Hebron, a city where hundreds of Israeli settlers, under heavy army protection, live among some 200,000 Palestinians.

Other citizens, and many senior military figures, believed the shooting could not be justified and that Azaria, who made far-right, anti-Palestinian postings on Facebook before being conscripted, acted in cold blood and outside military procedures.

The verdict was greeted with dismay by Azaria’s family. His mother screamed at the judges, saying: "You should be ashamed of yourselves," while another relative shouted “disgusting leftists” and stormed out.

The father of Elor Azaria kisses his head during an earlier hearing. AMIR COHEN / Reuters

However, Sari Bashi, Israel advocacy director at Human Rights Watch, said the conviction was “a positive step toward reining in excessive use of force by Israeli soldiers.”

Since October 2015, there have been more than 150 instances in which Israeli security forces have fatally shot Palestinians suspected of carrying out attacks, Bashi added.

Azaria, who is expected to be sentenced in the coming weeks, sat emotionless as the verdict was delivered. A manslaughter conviction can carry a jail term of up to 20 years, although observers say a sentence of four to five years is more likely.

Heller said Azaria was an “unreliable” witness and that his defense witnesses were also problematic. “We found there was no room to accept his arguments,” she said. “His motive for shooting was that he felt the terrorist deserved to die.”

Polls suggest the Israeli public backed the soldier. In one survey, nearly half of Israeli Jews agreed that any Palestinian who carries out an attack should be killed on the spot.

Supports believe Azaria's trial was unfair because of the public outcry and debate the case has provoked.

"The entire process was polluted even before it began," Naftali Bennett, a far-right party leader in PM Benjamin Netanyahu's coalition, said ahead of the verdict on Tuesday. "I hope he is acquitted and if he is not acquitted, I believe he should get an immediate pardon so that he does not go to jail."

Supporters of Elor Azaria marched outside the military court, shouting and cheering.

Israeli Defence Force (IDF) Chief of Staff Gadi Eisenkot appeared to weigh in on the case Tuesday in a speech, saying soldiers should not be seen as children.

“An 18-year-old man serving in the army is not everyone’s child,” Eisenkot said, according to the Times of Israel. “He is a fighter, a soldier, who must dedicate his life to carry out the tasks we give him. We cannot be confused about this.”

Baruch Marzel a right-wing settler from Hebron, told NBC News outside the court: "Elor is innocent, he saved my family's life. I have no hope in this court. Elor did exactly what was needed to be done. Elor is a hero, if there is danger to your friends you need to kill the terrorist."

Lt. Col. Nadav Weissman, a military prosecutor, said the verdict "speaks for itself."

"This is not a happy day for us. We would have preferred that this didn’t happen. But the deed was done, and the offense was severe.”

Sharon Gal, the Azaria family’s media adviser, believed the court had ignored the defense evidence. "I felt that the court picked up the knife from the ground and stabbed it in the back of all the soldiers," he said.