Today, the International Court of Justice (ICJ) in The Hague will release its long-awaited advisory opinion on the legality of the controversial "separation barrier" Israel has been constructing inside the occupied West Bank. Although the ICJ opinion will not be binding, it will hopefully address, among other things, the core issue of whether or how the barrier can be reconciled with Israel's obligations under international humanitarian law - something that a landmark ruling last week by Israel's High Court of Justice did not do.

On June 30, Israel's High Court ruled that a planned 30-kilometer portion of the barrier northwest of Jerusalem would have a disproportionate impact on Palestinian villagers cut off from their lands and ordered the government of Prime Minister Ariel Sharon to redraw the route. (The next day the same court temporarily suspended construction of part of the barrier south of Jerusalem.)

Proportionality - weighing the advantages offered by a military operation against the human cost associated with it - is an important component of international humanitarian law. The High Court's opinion might alleviate some of the barrier's immediate harm to Palestinian villages and towns in the West Bank, including crushing restrictions on freedom of movement and severely diminished access to jobs, hospitals, schools and families.

But proportionality is something to be weighed only once an act is deemed necessary. On the crucial question of necessity, in other words, the High Court accepted not only the Sharon government's security rationale for a barrier, but also its enormous deviations away from the country's internationally recognized boundaries and into the West Bank.

Israel's legal right to build a barrier between itself and the West Bank to protect against attack is undisputed. The separation barrier, however, is almost entirely inside the occupied West Bank; it de facto annexes Israeli settlements and in the process encloses more than 180,000 Palestinians in an archipelago of cantons under overall Israeli control.

Under international humanitarian law, the prohibition on settlements in occupied territory is absolute, and Israel's settlements have, accordingly, attracted universal condemnation. This does not reflect an abstract rule, but a hard-learned lesson from history. After World War II, the drafters of the Fourth Geneva Convention specifically intended to prevent states from colonizing territories they occupied, knowing that such settlements would cause grave harm to the local population.

A barrier that effectively annexes such illegal settlements - whether for "security" reasons or for "political" ones - is still illegal. Even Israel's closest allies rightly see the barrier's West Bank encroachment as unnecessary, if not as an outright land grab.

Israel's insistence on the "temporary" nature of the structure is questionable, given the barrier's enormous cost and the indisputable fact that other supposedly temporary Israeli policies - including the settlements themselves - have become effectively permanent. And some of its effects, including the widespread destruction of housing and agricultural land along the route, are undoubtedly of a permanent nature.

Israel's High Court can be, and has been, decidedly progressive on domestic issues, including gay rights and the environment. And for Israeli peace activists and Palestinians seeking any measure of relief, the ruling was a welcome respite: It was a small victory in a gloomy time. But by ignoring the underlying illegality of the settlements under international humanitarian law, the court's ruling appears to legitimize the barrier as planned, and suggests that only minor adjustments be made to its route.

The Israeli government is already using the High Court's decision to deflect international pressure. As Foreign Minister Silvan Shalom said during a recent visit to Washington: "The decision of the High Court of Justice in Israel on the wall proves that we can deal with this on our own."

Actually, the High Court ruling proves the opposite: It failed to uphold some basic standards of international humanitarian law. The ICJ opinion will hopefully address these very issues that the Israeli high court has declined to take up.

Sarah Leah Whitson is executive director of the Middle East and North Africa division at Human Rights Watch. She wrote this commentary for THE DAILY STAR