Israeli Defense Forces (IDF) soldier Elor Azaria, who shot and killed a wounded Palestinian assailant, has been sentenced to 18 months in prison by a military court.

The verdict was delivered on Tuesday. Prosecutors asked the judge to sentence Azaria to three-five years in prison, while the defense insisted the soldier should be freed.

Chief Judge Maya Heller said that Azaria "took upon himself to be both judge and executioner," Reuters reported.

"One cannot use this type of force, even if we're talking about an enemy's life," the court said.

#Breaking: "Hebron Shooter" Elor Azaria sentenced to 18 months in prison — Paula Slier (@PaulaSlier_RT) February 21, 2017

Azaria’s defense has vowed to appeal the court’s ruling, and asked for a delay to the start of the sentence until an appeal is submitted, the Jerusalem Post reported.

The IDF prosecution said it wanted the soldier’s jail term to start by this Sunday, the paper added.

In March 2016, Azaria fatally shot Abdel Fattah al-Sharif, a Palestinian assailant who had already been incapacitated, in Hebron in the West Bank.

Judge: Must recognize that when IDF soldiers break rules this can reduce future ability of IDF to act because of loss of legitimacy. — Yonah Jeremy Bob (@jeremybob1) February 21, 2017

READ MORE: Video suggests knife near Hebron assailant killed by IDF soldier was ‘planted’

Al-Sharif was shot and wounded as he attempted to stab an IDF soldier. Fifteen minutes later, Azaria shot him in the head. He explained his decision by saying he suspected that the Palestinian still posed a threat.

The incident in March was filmed and then emerged online, published by B’Tselem human rights group. The case has divided Israeli society, with right-wingers generally defending the IDF soldier’s actions.

In January this year Azaria was convicted of manslaughter. Saying that “there is no grounds for the claim of self-defense,” the judge then stated “Azaria’s shooting was unjustified.”

Azaria himself insisted that the Palestinian still posed danger as his knife was nearby.

"He deserves to die," he was quoted in the verdict as telling another soldier after pulling the trigger.

READ MORE: IDF soldier who shot & killed immobile Palestinian assailant convicted of manslaughter

Prime Minister Benjamin Netanyahu has supported Azaria, saying in January that “IDF soldiers are our sons and daughters and must remain above any controversy.”

Idf prosecution: court should reject defense's appeal to a compromise to satisfy the public's sympathy for azaria. Its not relevant. — Yonah Jeremy Bob (@jeremybob1) February 21, 2017

“This is a difficult and painful day for all of us, first and foremost for Elor and his family, for IDF soldiers, for many citizens, and for parents of our soldiers – myself included,” Netanyahu added after the original conviction.

Education Minister Naftali Bennett has also condemned the judiciary’s decision, while hundreds of activists demonstrated in support of Azaria.

Live photos from the protest outside courthouse:#ElorAzariapic.twitter.com/45unk2bCyV — Paula Slier (@PaulaSlier_RT) February 21, 2017

Ahead of the court’s decision Azaria's father, Charlie, addressed a crowd of demonstrators.

"None of us have any expectations, we shall accept the sentence whatever it may be," he said, as cited by AP.

The crowds outside the court were heard shouting words of support for Azaria. "Death to terrorists,” one of the banners read.

The sentence served as an "important message аbout reining in excessive use of force. But senior Israeli officials should also repudiate the shoot-to-kill rhetoric that too many of them have promoted, even when there is no imminent threat of death,” Israel and Palestinian Advocacy Director of Human Rights Watch Sari Bashi said, as cited by the Jerusalem Post.

“Pardoning Azaria or reducing his punishment would only encourage impunity for unlawfully taking the life of another person,” she added.

Al-Sharif’s father told Reuters that through the decision the Israeli authorities "are laughing at us.”

The Palestinian authorities strongly criticized the court ruling as being too lenient.

"The Palestinian government views this light ruling against the murderer soldier as a green light to the occupation army to continue its crimes," Palestinian spokesman Tarek Rishmawi told AFP.