(This story published on Jan. 3 corrects first paragraph to show that soldier was stabbed)
By Luke Baker
JERUSALEM (Reuters) - Last March, Sergeant Elor Azaria, a 19-year-old Israeli army medic deployed to the occupied West Bank, shot and killed a Palestinian assailant as he lay wounded and motionless on the ground after stabbing another Israeli soldier.
The shooting, and the tense moments leading up to it, were captured on video by a Palestinian human rights activist in the city of Hebron. The video footage, distributed to news organisations, ensured that the incident, which came amid a wave of Palestinian stabbings, drew international attention.
Azaria, now 20, was charged with manslaughter and put on trial in a military court, with the verdict due on Wednesday.
The case has divided Israel, with many citizens, right-wing politicians and some celebrities rallying behind Azaria, saying he is being made a scapegoat and should be let off lightly.
His actions, they say, 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.
On the other side stand serving members of the military establishment, who say the shooting cannot be countenanced, that Azaria, who made far-right, anti-Palestinian postings on Facebook before being conscripted, acted in cold blood and outside military procedures.
"An 18-year-old man in the Israeli army is not 'everyone's child'," Lieutenant-General Gadi Eisenkot, the chief of staff, said in a speech on Tuesday, remarks that were seen as a rebuke to the public campaign in support of Azaria, whose mother was often shown in news photos hugging her son in court.
While acknowledging the "lively dialogue among the public and on the internet", Eisenkot said the army was not elected by the public or shaped by popular surveys. "It has no effect on the command structure," he said.
The case has prompted sharp words and controversy from the very beginning. At the scene just before the shooting, the video shows Israeli settler leaders standing among the soldiers and seemingly directing their response.
Initially Prime Minister Benjamin Netanyahu backed his then defence minister, Moshe Yaalon, in his criticism of Azaria's actions. But then Naftali Bennett, a far-right party leader in Netanyahu's coalition who draws strong backing from the settler movement, came out in vocal support of Azaria.
Surveys show the public backs the soldier -- in one poll, nearly half of Israeli Jews agreed that any Palestinian who carries out an attack should be killed on the spot. Palestinians were outraged, but their alarm hardly figured in the public debate in Israel, which dominated airwaves and the internet.
Netanyahu's tune appeared to change. He took the unusual step of calling Azaria's parents to express his sympathy.
"As a father of a soldier, I understand your distress," he told them, adding that he was confident the military justice system would be "professional and fair" with their son.
Shortly afterwards, Yaalon quit, with the issue of Azaria one of several differences with Netanyahu's administration.
Rallies in support of the soldier, some of them backed by right-wing politicians and pop singers, gathered momentum. Despite the high-level charges against him, Azaria was not remanded in custody but allowed on "open arrest" at his base.
The manslaughter charge can carry a jail term of up to 20 years, although legal commentators have suggested a sentence of four to five years is more likely if he is found guilty.
Ahead of the verdict, family members and supporters have declared that the trial cannot have been fair because of the public outcry and debate the case has provoked.
"The entire process was polluted even before it began," Bennett told Army Radio 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."
(Additional reporting by Maayan Lubell and Jeffrey Heller in Jerusalem; Writing by Luke Baker; Editing by Dominic Evans)