JERUSALEM — When an Israeli soldier fired a single shot through the window of a home in a West Bank settlement this month, wounding a Palestinian assailant and putting an end to a stabbing rampage that killed three people, many Israelis hailed the soldier as a hero.

But others criticized the unnamed soldier, who was home on leave in the settlement, for merely incapacitating the Palestinian intruder, not killing him. They suggested the soldier held off for fear of ending up like Elor Azaria, the former sergeant whose legal case has rocked Israel.

On Sunday, an Israeli military court rejected an appeal by Mr. Azaria, upholding a manslaughter conviction in January in the shooting death of another Palestinian assailant as he lay wounded on the ground. The court also upheld Mr. Azaria’s prison sentence of 18 months, turning down a request by military prosecutors to increase the jail term.

The Israeli military, usually the country’s most respected institution, has been battling a tide of popular sympathy for Mr. Azaria. It has also been emphasizing its rules of engagement, which call for soldiers to use no more force than is necessary, amid criticism from rights groups accusing Israeli security forces of being too quick to pull the trigger.