The World Court ordered Israel on Friday to prevent acts of genocide against the Palestinians and do more to help civilians, although it stopped short of ordering a ceasefire as requested by South Africa.

While the ruling denied Palestinian hopes of a binding order to halt the war in Gaza, it also represented a legal setback for Israel, which had hoped to throw out a case brought under the genocide convention established in the ashes of the Holocaust.

The court found that Palestinians were protected under the convention, and that there was a case to be heard about whether their rights were being denied in a war that the court said was causing grievous humanitarian harm. It also called for Palestinian armed groups to release hostages captured in the Oct. 7 attacks that precipitated the conflict.

Palestinian officials largely hailed the decision. The Palestinian Foreign Ministry said it was a welcome reminder “no state is above the law”. Sami Abu Zuhri, a senior Hamas official told Reuters the decision would contribute to “isolating the occupation and exposing its crimes in Gaza.”

Israeli Prime Minister Benjamin Netanyahu said that the court had “justly rejected the outrageous demand” to deprive Israel of what he called the “basic right to defend itself”, by ordering it to halt fighting.

“But the mere claim that Israel is committing genocide against Palestinians is not only false, it’s outrageous, and the willingness of the court to even discuss this is a disgrace that will not be erased for generations.”

Israeli Security Minister Itamar Ben-Gvir mocked the ruling in a two-word social media post with a Yiddish-style putdown: “Hague shmague”.

South Africa brought the case to the International Court of Justice (ICJ) earlier this month, asking it to grant emergency measures to halt the fighting, which has killed more than 26,000 Palestinians and displaced the majority of the population in a more than three-month campaign of intensive bombardment.

It accused Israel of state-led genocide in its offensive, begun after Hamas militants stormed into Israel killing 1,200 and kidnapping more than 240. Israel sought to have the case thrown out.

The judges ordered Israel to take all measures within its power to prevent its troops from committing genocide, punish acts of incitement, take steps to improve the humanitarian situation and report back on its progress in a month.

It did not decide the merits of the genocide allegations, which could take years. Although the ruling cannot be appealed, the court has no mechanism to enforce its decision.

Israel had demanded the case be thrown out, calling South Africa’s allegations false and “grossly distorted”. It says it has acted in Gaza in self defence against a foe that attacked first, and blames Hamas for harm to civilians for operating among them, which the fighters deny.

The South African government, allowed to make the case under the legal principle that genocide is such a grave crime that all countries are duty-bound to prevent it, hailed the court order as a “decisive victory” for international rule of law.

“South Africa sincerely hopes that Israel will not act to frustrate the application of this Order, as it has publicly threatened to do, but that it will instead act to comply with it fully, as it is bound to do,” its foreign ministry said in a statement.

The country’s Deputy President Paul Mashatile and Justice Minister Ronald Lamola were seen cheering and dancing at a gathering of the governing African National Congress party following the court’s verdict, which was televised live.

ASSAULT ON KHAN YOUNIS

On the ground in Gaza, the war has entered a particularly destructive phase, with the heaviest fighting in weeks now taking place in crowded areas jammed with hundreds of thousands of people who fled from earlier fighting elsewhere.

On Friday, Israel kept up its bombardment of the main Southern city of Khan Younis, where it said it was involved in “intensive battles”, with forces striking dozens of Hamas fighters and infrastructure from the air and ground.

Residents said gunbattles raged overnight, with Israeli forces blowing up buildings and houses in the western part of the city in what has become one of its biggest offensives so far, waged among hundreds of thousands of displaced civilians.

Israel said it had discovered some 200 tunnel shafts and destroyed more than 130 militant infrastructure sites in its latest operations, as well as killing “numerous militants”.

Palestinians say Israel has blockaded hospitals making it impossible for rescuers to reach the dead and wounded. Israel denies blockading hospitals and says Hamas fighters are to blame for fighting near them for operating there.

“We believe many victims are still under the rubble and on the roads, the occupation prevents ambulance and civil emergency teams from reaching them,” Gaza health ministry spokesman Ashraf Al-Qidra said.