The best line in the 1992 movie, “Unforgiven,” is when Gene Hackman is looking up into Clint Eastwood’s shotgun and moans, “I don’t deserve this … to die like this,” and Eastwood snarls back, “Deserve’s got nothin’ to do with it.”

That exchange is the only way to make sense of what passes for international jurisprudence when it comes to Israel these days.

Last month, the International Court of Justice in The Hague ruled against the separation barrier that Israel is building between it and the West Bank. The World Court ruled that the barrier, which is mostly composed of a series of fences and sensors, abrogates the sovereign rights of the Palestinian people. Because the barrier as currently conceived will incorporate, according to United Nations estimates, 14 percent of the disputed West Bank territory, the justices ruled the fence violates the Palestinian right to self-determination and is “tantamount to de facto annexation.”

The court did acknowledge that Israel had a right to defend itself against terror — a few lines in a long, scathing decision — then went on to demand Israel tear down its fence.

Israel said it would ignore that ruling and a subsequent U.N. General Assembly resolution calling on it to carry out the court’s decision.

Other commentators have pointed out the laughable hypocrisy of the World Court itself. There is the Chinese judge, representing a country which, to put it mildly, didn’t bother to erect a fence between itself and Tibet. China just went in and took it over. And there is a Russian judge, who might want to rule next on his own government’s scorched-earth methods of dealing with terror in Chechnya.

But, no. Israel’s response to a campaign of relentless terror has been relentlessly subjected to a kind of snap international legal judgment. And deserve’s got nothing to do with it.

A Georgetown University professor decreed in the Washington Post that Israel’s policy of targeted assassinations against terror leaders was “illegal and extra-judicial.” The American news media quickly echoed his conclusion. One ABC anchor explained to an Israeli leader that killing a Hamas leader was “taking the law into your own hands.”

And it is nearly impossible to find a news report that doesn’t refer to the West Bank and Gaza settlements and the Israeli occupation itself as illegal, though international experts at the very least differ on this fact.

One can argue whether the actions Israel’s government has taken in the face of terror and recalcitrance are moral or effective. One can argue that Israel’s settlement policy — as its architect, Prime Minister Ariel Sharon, has come around to doing — is deleterious to the nation’s security.

But it eludes me how trying Israel in an international kangaroo court serves either the Palestinian cause or that of justice itself.

What it serves is a politically bankrupt Palestinian leader’s aim of undermining Israel in world opinion.

P.A. Chairman Yasser Arafat has used the strategy in the past to wonderful effect. Having presided over a disastrous second intifada, he has pulled an old tool from his belt — use the international legal process to delegitimize the Jewish state.

Arafat’s two biggest successes in this score were the 1975 U.N. resolution labeling Zionism as racism — overturned in December 1991 — and the U.N. World Conference against Racism in Durban, South Africa, in August-September 2001, at which paragons of human rights like Syria passed a resolution that condemned, “Israel as a racist apartheid state in which Israel’s brand of apartheid is a crime against humanity.”

Also last month, Israel’s own judicial system yet again foiled the nation’s enemies’ best efforts at defaming it. Israel’s Supreme Court ruled that in places where the security barrier “injures the local inhabitants in a severe and acute way, while violating their rights under humanitarian international law” the government would have to change its course. Sharon promptly declared that he would abide by the decision of his Supreme Court, which judiciously sought to balance Israel’s security needs with Palestinian rights, and ignore the World Court, whose imbalance was patently clear.

It would be easy to write off the Palestinian strategy to attack Israel on the legal front as mere propaganda. The World Court ruling was, after all, nonbinding, and lately, editorials decrying Arafat’s uselessness have overtaken those denouncing the fence. But the cumulative effect of these efforts is to delegitimize not Israel’s policies, but the very idea of the state itself. After all, an outlaw state has no more right to exist than an outlaw, like the kid says in “Unforgiven”: “I guess they had it comin’.”