An Israeli military court has upheld the 18-month sentence of a soldier convicted of fatally shooting in 2016 a Palestinian attacker who lay wounded on the ground.

The court Sunday found no reason to accept Elor Azaria's appeal and overturn the sentencing handed down after his conviction on a manslaughter charge.

“It is unfortunate that such an excelling soldier found committed such a terrible error,” the court said as it explained its rationale on the sentence. For almost four hours, the court has laid out its reasoning and explanations. “The punishment is modest,” the court added, even noting it is “on the lower edge of available sentences.”

In the end, in a 3-to-2 decision, the court upheld the 18-month sentence, to begin when Azaria enters prison. During the last part of the reading, when the five-judge panel reached the verdict, family and friends of Elor Azaria put on black T-shirts, and started shouting at the court. Several military policemen entered the courtroom, and the judge stopped reading the ruling, asking Azaria's mother to be quiet or she would be forced to leave.

The act, the appeals judges said, is “forbidden, severe, immoral. The appellant had an intent to kill the assailant.”

Prime Minister Benjamin Netanyahu and two other cabinet ministers called on Sunday for Sgt. Elor Azaria to be pardoned, after a military court denied the appeal of his manslaughter conviction for killing an incapacitated Palestinian attacker last year in Hebron. The military appellate court upheld Azaria's conviction, but also denied a prosecution appeal seeking a harsher sentence.

"My opinion hasn't changed about pardoning Elor Azaria," the prime minister said. "When the issue is brought up for consideration, I will submit my recommendation for a pardon to the relevant officials."

Earlier, Defense Minister Avigdor Lieberman and Education Minister Naftali Bennett asked the public and the Azaria family to respect the appellate court's ruling. They also called on Azaria to submit a request for a pardon.

“I ask the Azaria family not to file another appeal and to turn to the [IDF] chief of staff with a request for a pardon," Lieberman said in a tweet. "I have no doubt the chief of staff will take all the difficult circumstances and his being an outstanding soldier into consideration.”

Unless Azaria appeals to the Israeli Supreme Court, he will be imprisoned on August 9.

Sgt. Elor Azaria, an army combat medic, was recorded on a cellphone video as he fatally shot a badly wounded Palestinian who had previously attacked a soldier with a knife, wounding him. The Palestinian, Abdel Fattah al-Sharif, was lying on the ground unarmed when Azaria shot him in the head.

The 2016 incident occurred in the volatile West Bank city of Hebron at a time of frequent Palestinian attacks.

The Associated Press contributed to this report.