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

TEL AVIV, Israel — An Israeli military court sentenced a soldier Tuesday to 18 months in prison for the deadly shooting of a Palestinian attacker who lay wounded on the ground, capping a nearly yearlong saga that has deeply divided the country.

The sentence, which included a year's probation and a demotion in rank, was lighter than expected. Prosecutors had asked for a prison term of three to five years. Palestinians dismissed the sentence as a "joke."

"If one of us killed an animal they would have put him in jail for God knows how long"

Yet it triggered disappointment from several hundred protesters outside the Tel Aviv court, who had hoped to see the soldier walk free.

Sgt. Elor Azaria, 20, is to start serving his term on March 5; politicians immediately called for him to be pardoned.

"Even if he erred, Elor should not sit in prison. We will all pay the price," said Education Minister Naftali Bennett, leader of the nationalist Jewish Home Party and an early supporter of the soldier.

But Palestinians said the light sentencing encouraged Israeli soldiers to use excessive force.

Israeli soldier Elor Azaria is embraced by his mother at the start of his sentencing hearing in Tel Aviv on Tuesday. Jim Hollander / EPA

"This sentence is a joke, and it shows how much discrimination Israeli courts practice against Palestinians," said Issa Karaka, the Palestinian government minister for prisoners.

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

Azaria was convicted of manslaughter last month in a rare case of a military court ruling against a combat soldier for lethal action in the field.

Azaria was serving as an army medic in the town of Hebron in the occupied West Bank when two Palestinians stabbed and wounded another soldier.

One of the assailants was shot dead by troops. The other was shot and wounded. Eleven minutes later, as the wounded man, Abdel Fattah al-Sharif, 21, lay on the ground unable to move, Azaria, then 19, took aim with his rifle and put a bullet in his head.

The Palestinian was motionless on the ground — wounded and disarmed — when Azaria fatally shot him. The incident was captured on cellphone video.

The court said Azaria had "taken upon himself to be both judge and executioner" and had not expressed regret for his crime.

The verdict marked a victory for commanders who said Azaria had violated the army's code of ethics. But the soldier generated support among members of the public, many of whom saw him as a scapegoat.

The dead Palestinian's father, Yousri al-Sharif, said the sentence made a mockery of justice. "If one of us killed an animal they would have put him in jail for God knows how long. They are only making fun of us," he said.

The father and mother of Palestinian Abdul Fatah al-Sharif watch the verdict on TV on Tuesday. Hazem Bader / AFP - Getty Images

Since September 2015, Palestinian attackers have carried out numerous stabbings and shootings that have killed 41 Israelis and two Americans. During the same period, Israeli forces have killed 235 Palestinians, most of them attackers.

Palestinians and human rights groups have accused Israeli forces of using excessive force in some of the cases. The video of the Azaria shooting, taken by a Palestinian human rights activist, was the strongest evidence to date to support such claims.

Azaria's defenders said he shot the assailant in self-defense, and hard-line politicians have said he should be either cleared or released with a light penalty.

But his detractors, including senior military commanders, have said his actions violated military procedures.

Military service is compulsory for Israel's Jewish majority, and there is widespread sympathy for soldiers, since virtually every family has a member who is serving or has served in the past.

After the verdict last month, Prime Minister Benjamin Netanyahu called for Azaria to be pardoned. Netanyahu was on a trip to Singapore and Australia and did not immediately react to the sentencing.

Commenting on Facebook after the sentencing, Israeli Defense Minister Avigdor Lieberman said the "terrorist had come to kill Jews and everyone must take this into account."

Col. Maya Heller, head of the three-judge panel, noted that the incident took place "in hostile territory" and it was Azaria's first real operational experience.

However, she said Azaria had not expressed remorse and ruled that he did not open fire out of danger, but rather to harm the assailant.