TEL AVIV - A military court postponed on Thursday the jailing of an Israeli soldier convicted of shooting dead a wounded Palestinian, pending his appeal.

Elor Azaria was sentenced by a military court on February 21 to 18 months in jail after an exceptional trial that captivated Israel and highlighted deep divisions in public opinion. He was due to begin his sentence on March 5, but an appeals court accepted the defence’s request to delay the sentence.

“The imprisonment will be postponed until the result of the appeal,” appeals court judge Orly Markman said, adding that Azaria would be confined to base in the meantime. Defence attorney Yoram Sheftel said he would be ready to begin the appeal within six weeks. “I am rejoicing,” he said after the court ruling. Azaria appeared in court Thursday in full military uniform and smiling broadly. His father Charlie also welcomed the ruling. “I hope that the spirit of justice there was at the hearing today will continue throughout the entire appeal,” he told journalists.

The March 2016 shooting in the occupied West Bank city of Hebron was caught on video by a rights group and spread widely online. It showed Abdul Fatah al-Sharif, 21, lying wounded on the ground, shot along with another Palestinian after stabbing and wounding a soldier, according to the army.

Azaria then shoots him in the head without any apparent provocation. Azaria said he feared Sharif was wearing an explosive belt and could blow himself up, a claim judges rejected. His 18-month sentence, with another 18 months suspended, was condemned as too stern by rightwing politicians and labelled too lenient by Palestinians and rights groups.

The decision to appeal was controversial, with three of Azaria’s lawyers announcing Wednesday they were resigning from the case.

In a statement, the lawyers said they believed avenues other than an appeal would be preferable to Azaria.

The outspoken Sheftel, who only joined Azaria’s defence team in January, won his fame successfully representing Nazi death camp guard John Demjanjuk in the appeal against his death sentence in Israel in 1993.

“I stand here alone, but beside me there are millions,” he said at the beginning of Thursday’s court session, referring to opinion polls that show public support for pardoning Azaria.

The case came against the backdrop of a wave of Palestinian knife, gun and car-ramming attacks that erupted in October 2015.

Prime Minister Benjamin Netanyahu has led calls for him to be pardoned, a process that cannot occur until after the appeal.

Military leaders have said the conviction is important for the institution’s reputation.

The Palestinian government described the 18-month sentence as a “green light to the occupation army to continue its crimes.”

Amnesty International said the sentence did “not reflect the gravity of the offence,” while the UN human rights office said it was an “unacceptable” punishment for “an apparent extra-judicial killing.”

Israel has occupied the West Bank since 1967.