Very few incidents in recent times illustrate the complexity of Israeli society as much as the killing by an Israeli soldier of a Palestinian attacker, the 21-year-old Abdel Fattah al-Sharif on March 24. The accused soldier now stands trial in a military court in Jaffa.  But as I learned on a recent trip to Israel, outside the courtroom, where the application of military justice will surely be applied; there are a host of deeper issues at play that demonstrate profound divides within Israeli society.

As the story has evolved in recent days, it is clear that something went terribly wrong. Both the video recorded by the left-wing human rights organization, B’Tselem, and Israeli military interviews with soldiers who were present indicate that the Israeli soldier shot al-Sharif when he was lying on the ground, some ten minutes after Sharif and another assailant stabbed and moderately wounded a soldier in Tel Rumeida. The issue of military ethics is over the fact that the fatal shooting took place after the attacker had been incapacitated by a group of Israeli soldiers following his stabbing attempt.

This should have been one of the proudest moments for the State of Israel.  Here was one more terrorist stabbing, a pattern of attacks by Palestinians against innocent Israeli civilians and random soldiers, that has left 34 Israelis dead and injured 413. And yet, despite the understandable anxiety of the Israeli public in the face of these seemingly unending assaults, the military made clear that standards of conduct must be maintained and violations will be prosecuted and punished.

In the cacophony that followed, it is easy to lose sight of a basic fact. That this incident, with all its problematic elements, highlights the remarkable ethical standards long established by the Israel Defense Forces. The IDF have rules of engagement for its soldiers that are unique to the Middle East and a code of ethics that Israel has maintained for decades, despite having neighbors committed to its destruction and facing waves of terrorist attacks over and over again since the very state was founded by a vote at the United Nations.

Israel’s enemies often use its adherence to such a code to their advantage, planting their military assets deep within civilian areas and using civilians as human shields. The philosopher Moshe Halbertal wrote brilliantly about this asymmetry after the first war in Gaza in 2009.

If this terrible incident has demonstrated anything, it is that Israel’s military leadership takes those standards extremely seriously. The leadership in particular of the Chief of Staff, Gadi Eisenkot has been extraordinary in this regard. In the face of public attacks. Eisenkot has stood by Israel’s rules of engagement and code of ethics. The Minister of Defense, Moshe Yaalon, affirmed early on that “in utter breach of IDF values and of our code of ethics in combat” and in the face of mounting pressure, he stood up for these principles from the floor of the Knesset.

Unfortunately, what should have been a case of an exemplary response to a troubling incident has gone in other directions. There has been a public reaction that is surprising and disturbing, which sees the soldier as ‘heroic’ in his having killed the Palestinian attacker, despite his having done so after the assailant no longer posed a threat.

Almost from the moment that Yaalon and Eisenkot announced an arrest of the solder and an investigation, they have come under bitter attack from certain politicians and on social media with increasing levels of vitriol aimed at them.

Minister Naftali Bennett of the Jewish Home launched an assault on the defense establishment.  He called the murder indictment “hysterical” and protested the army’s own publicizing of the findings of the investigation.

Avigdor Liberman of the opposition Yisrael Beiteinu party, accused both the Prime Minister and Defense Minister of inappropriately speaking out against the soldier before an investigation was concluded. Ayelet Shaked, Minister of Justice, said that the accused soldier’s “blood was let and he was prejudged before all the facts were clarified.”

What was so remarkable about all this was that the military, which for decades has been consistently considered the most respected institution in Israeli society, was being denounced. Politicians have attacked the IDF, not for violating any code of ethics (an objective investigation is still to follow), but for insisting that the strength of the military resides in those ethical standards no matter the provocation.

Indeed, the Israel Democracy Institute recently found that there is a large segment of the Israeli public which supports a view which is counter to the Israeli rules of engagement—that “it is a commandment to kill a terrorist who comes at you with a knife.”

Social media has provided a platform for escalating attacks on public figures who have stood by the IDF’s code of ethics. One message had photos showing an image of Yaalon at the center of a bulls-eye, under which is written “politically eliminated.” The suggestion is clear. And another stated that the Likud Central Committee would respond by “assassinating” Yaalon in the next primaries.

Posters appeared in Tel Aviv soon after the shooting depicting General Eisenkot as the gullible Persian King Ahashverosh who initially went along with a plot to kill the Jews of Shushan in the story of Purim — and concluded, “Jewish blood is not to be abandoned.” This type of incitement is nothing short of dangerous.  It is reminiscent of a dark time in Israel’s history when a military hero was demonized as a betrayer of Israel.

Meanwhile, upwards of 1,000 demonstrators gathered outside the Qastina Military court to support the soldier and to oppose the way the military leadership was handling the case. And when a Zionist Union MK, Zuheir Bahloul, said that it is wrong to call a Palestinian stabber who directs an attack against a soldier (rather than against a civilian) a ‘terrorist’, this further enraged many Israelis and rightly so.

All of this speaks to the great rift that is wracking Israeli society — much too often, such internal dynamics are not taken properly into account when Israel is viewed from the outside.

To be clear, the soldier deserves a fair trial, as in any democratic society in which there is an expectation of due process.

But leaders, whether military or political have an obligation to react in a manner that respects the institutions which democracies have in place to hold all accountable to the law. The prime minister himself was very clear when, upon learning of the incident, he accused the soldier of “acting contrary to the values of the IDF.”  Unfortunately, he left more of an ambiguous message when he initiated a call with the family of the soldier, which created an impression that he was stepping away from his initial public position.

But most of all, this issue speaks to the complexity that faces Israel and its leaders every day. It touches on the corrosive effect of repeated terrorist attacks that have continued unabated for nearly 70 years, sustained pain that would unravel almost any other society. It speaks to a siege mentality taking root when Israelis perceive a world that doesn’t seem to care about them or even blames Israel for disproportionate responses in the face of asymmetric conflict; it speaks to how responsible and courageous leaders maintain their principles even in times of anxiety; and it speaks to how the IDF and its values, are less important to some than their hatred of Palestinians and Arabs.

In the final analysis, Israel must defend itself. To do so effectively, it must maintain its ethical standards. It can be done, and, we believe, it will be done.