The Israeli government recently decided it would not cooperate with a United Nations commission charged with investigating allegations that war crimes were committed by Israel and Hamas during their 50-day war in the Gaza Strip last summer.

This comes as no surprise.

Last August, Prime Minister Benjamin Netanyahu, as well as Foreign Minister Avigdor Liberman, suggested that Israel had no intention of cooperating. As Netanyahu put it, “Instead of inquiring into the massacres that (Syrian President Bashar) Assad is perpetrating against the Syrian people or that (Islamic State) is perpetrating against the Kurds, the UN has decided to come and check Israel.”

It’s debatable whether Israel is acting in its best interests by boycotting the inquiry, which will be conducted by the Geneva-based Human Rights Council. To be sure, Israel should participate in the proceedings to ensure that its side of the story is fully documented and told.

The commission, which is due to release its report next March, was established on July 23, at the height of the war. The fighting claimed the lives of 73 Israelis — 67 soldiers and six civilians, including a four-year-old boy — and 2,200 Palestinians, the vast majority of whom were civilians.

At first glance, it’s understandable why Israel has chosen to boycott the commission set up by the Human Rights Council. The council is an inherently biased body, with many of its members, like Saudi Arabia and Pakistan, being instinctively anti-Israel. Israel’s foreign ministry has branded the commission as a “kangaroo court” whose verdict is preordained.

Furthermore, the Canadian law professor who’s heading the three person commission, William Schabas, is generally perceived to be ill-disposed toward Israel. Schabas, whose fellow commission members are Doudou Dienne of Senegal and Mary McGowan Davis of the United States, is on record as having said that Netanyahu should stand trial for war crimes at the International Criminal Court.

As a result, Yuval Steinitz, the Israeli minister of strategic affairs, has urged Schabas to resign, while Rabbi Shmuley Boteach, executive director of This World, an organization that promotes universal Jewish values in culture, media and politics, has called on the UN to “dump” Schabas, drop its investigation against Israel — the “Middle East’s only democracy” — and focus its attention on Syria, Islamic State and Hamas.

Schabas, however, has no intention of stepping down, saying he was recruited for his “expertise” and claiming he intends to leave “my own personal views at the door, as a judge does.” In addition, he denies he’s anti-Israel. “I do not hate Israel,” he claims.

Yet Israel’s aversion to the commission is not altogether unreasonable.

In the aftermath of the 2008-2009 war in Gaza, the Human Rights Council convened a commission, headed by South African jurist Richard Goldstone, to examine evidence of potential war crimes committed by Israel and Hamas.

Israel boycotted the commission, which accused the Israeli armed forces of having intentionally targeted Palestinian civilians. But after Israel presented compelling counter evidence,  Goldstone, in a celebrated Washington Post piece, retracted this accusation. As he wrote, “If I had known then what I know now, the Goldstone Report would have been a different document.”

Goldstone’s colleagues on the commission, though, disagreed with his appraisal and stood by its central conclusions.

Five years on, Goldstone’s retraction notwithstanding, Israel still feels a deep antipathy toward the Goldstone Report, regarding it as profoundly unfair and damaging.

Two weeks ago, in something of a reprise of the Goldstone Report, Amnesty International harshly criticized Israel for its conduct during the Gaza war. Claiming that Israel’s military tactics had been “deeply flawed and fundamentally at odds with international humanitarian law,” and that Israel had used disproportionate force, Amnesty International accused Israel of war crimes. Amnesty International also accused “Palestinian armed groups” of indiscriminately firing thousands of rockets and mortars into “civilian areas of Israel.”

Israel was incensed by the report, charging that Amnesty International “serves as a propaganda tool for Hamas and other terrorist organizations.”

It would not be far-fetched to conclude that Israel’s decision to boycott the proceedings of the United Nations Human Rights Council was partially influenced by Amnesty International’s critique.

In weighing the pros and cons of whether to participate in the council’s probe, I believe that Israel should have opted for cooperation. Why? The answer is clear to me. Israel has a good case and should be physically present to defend its actions so that they are not distorted by its enemies.

Let’s not forget what happened last summer. Israel was the victim of sheer and unadulterated aggression on the part of Hamas, which hews to an antisemitic charter that references the Protocols of the Elders of Zion, calls for Israel’s destruction and categorically rejects a two-state solution.

It’s absolutely clear that Israel was fighting a defensive war in response to Hamas and Islamic Jihad bombardments of Israeli sovereign territory. As Netanyahu correctly pointed out, Hamas was guilty of a “double war crime,” targeting Israeli civilians and deliberately using Palestinian civilians in Gaza as “human shields.”

Last August, Alan Baker, Israel’s former ambassador to Canada, dispatched a letter to UN Secretary General Ban ki Moon outlining Hamas’ crimes.

“We know that you are fully aware of the fact that Hamas, as a matter of its basic operational procedure, deliberately and willfully uses its civilians and its civilian structures, whether schools, hospitals, mosques or private homes, to shield its rocket emplacements, weapons manufacture facilities, tactical planning and operations centers and its stocks of rockets and other weapons. You are fully aware … that they do this deliberately in order to generate civilian casualties, as part of their propaganda warfare.”

Two months ago, in a surprising admission, Hamas admitted that “some mistakes” had been made in firing rockets at Israeli civilians. These were certainly not “mistakes.” Hamas strategically targeted Israeli civilians in the cynical hope that Israel would react with force and thereby earn international condemnation and opprobrium.

As Israel’s ambassador to the UN, Ron Prosor, has observed, the Human Rights Council has a solemn duty to take a long, hard look at the war crimes committed by Hamas and its allies in Gaza during last summer’s war.

In the meantime, Israel’s attorney general and the army’s advocate general have launched separate investigations to ascertain whether Israeli commanders, in prosecuting this war of no choice, perpetrated war crimes. I’m positive that no such investigations will be conducted by either Hamas or Islamic Jihad.