A right wing supporter of Israeli solider Sgt. Elor Azaria is detained by police outside the Israeli military court in Tel Aviv, Israel, Wednesday, Jan. 4, 2017. Scuffles erupted outside the courtroom between supporters of an Israeli soldier convicted of manslaughter over the death of a wounded Palestinian attacker and police officers. (AP Photo/Ariel Schalit)
A right wing supporter of Israeli solider Sgt. Elor Azaria is detained by police outside the Israeli military court in Tel Aviv, Israel, Wednesday, Jan. 4, 2017. Scuffles erupted outside the courtroom between supporters of an Israeli soldier convicted of manslaughter over the death of a wounded Palestinian attacker and police officers. (AP Photo/Ariel Schalit) Credit: ap photographs

Tel Aviv, Israel — The rare manslaughter conviction on Wednesday of an Israeli soldier who fatally shot a badly wounded Palestinian attacker exposed a deepening rift between proponents of the rule of law and a burgeoning nationalist movement.

The military court verdict against Sgt. Elor Azaria marked a victory for commanders seeking to preserve a code of ethics, but it also brought calls for a pardon from prominent hard-line politicians, led by Prime Minister Benjamin Netanyahu, who expressed sympathy for the soldier or depicted him as the victim of a detached elite.

In a statement on Facebook, Netanyahu urged the public to “act responsibly” toward the military, Israel’s most respected institution.

“We have one army that is the basis for our existence. IDF soldiers are our sons and daughters, and they must remain above all disputes,” he said. But making no direct mention of the military court, he said: “I support granting a pardon to Elor Azaria.”

With the statement, Netanyahu plunged into a visceral dispute that has deeply divided Israel, where military service is compulsory and support for young soldiers is widespread.

Since the March shooting, the military leadership has come under unprecedented criticism, as members of Netanyahu’s coalition accused top generals of abandoning a serviceman on the battlefield. The uproar helped fuel the resignation of Defense Minister Moshe Yaalon, who staunchly defended the army from the assault from within.

It is rare for a military court to rule against a soldier over lethal action taken in the field, not only in Israel but also elsewhere in the world. But for a country that claims to have the “most moral army in the world,” it had no choice but to come down hard on a soldier that the top brass was convinced had strayed, said Amichai Cohen, a senior fellow at the nonpartisan Israeli Democracy Institute think tank.

“If you want the justice system to be taken seriously, you have to punish something like this,” he said. “The court can’t be influenced by the changing political climate.”

Azaria, an army medic, was caught on video by a human rights worker fatally shooting Abdel Fattah al-Sharif, a wounded Palestinian attacker who had stabbed a soldier in the West Bank city of Hebron. Al-Sharif was on the ground, unarmed and virtually motionless, when Azaria fired a single bullet in his head.

The head of the three-judge panel, Col. Maya Heller, said there was no evidence to support his conflicting claims that the attacker was either already dead or had posed a threat.