By Paul Adams, BBC Diplomatic Correspondent
Analysis: This was not a complete victory for South Africa, or the Palestinians.
The International Court of Justice did not order Israel to halt its military campaign - an implied recognition of Israel's right to self defence in the wake of the Hamas attacks on 7 October last year.
But the UN's highest legal body has recognised that the situation in Gaza is catastrophic.
Crucially, it said that situation was "at serious risk of deteriorating further" before the court delivers its final verdict on the charge of genocide, a process that could take years.
As a result, it made several demands of Israel, broadly in line with most of the nine "provisional measures" demanded by South Africa.
By large majorities the court's 17 judges ruled that Israel should do everything in its power to avoid killing Palestinians, causing them serious bodily or mental harm, creating intolerable living conditions in Gaza, or deliberately preventing Palestinian births.
It also said Israel should do more to "prevent and punish" public incitement to genocide, citing examples by Israel's president and defence minister.
And there was a call for "immediate and effective measures" to address the humanitarian catastrophe in Gaza.
Not a call for a ceasefire, then, but a series of demands that, if implemented, would drastically change the nature of Israel's military campaign in Gaza.
Israel vehemently rejects the allegation of genocide, arguing that it is Hamas that's responsible for putting Palestinian civilians in harm's way.
It says Hamas operates inside and underneath Gaza's densely populated towns and refugee camps, making it virtually impossible for Israel to avoid killing civilians.
And it says that it has gone to great lengths to warn civilians to avoid danger.
The belief that Israel has "the most moral army in the world" is one almost universally held by the country's Jewish citizens.
But since early October, Israel's actions have resulted in the displacement of around 85 percent of Gaza's 2.3 million population.
Those who flee the fighting seeking refuge in squalid, overcrowded shelters, with dwindling healthcare and grossly inadequate humanitarian supplies.
It was clear, soon after the court's American president Joan Donoghue began speaking, that the urgency of Gaza's plight was uppermost in the court's mind and that Israel had not succeeded in its bid to have the entire case thrown out.
Judge Donoghue delivered a bleak summary of the suffering being experienced by Palestinians in the Gaza Strip. She said the plight of children was "especially heartbreaking".
This is not the court's final ruling on genocide - that's likely to take several years.
But the measures called for today are designed to offer the Palestinians of Gaza some measure of protection, while the judges consider South Africa's fundamental charge against Israel.
Israel must now decide how to respond. The ICJ's rulings are binding, but there's no enforcement mechanism. Israel could choose to ignore the judges altogether.
With diplomatic efforts now apparently concentrating on the possibility of a two-month ceasefire, and efforts still being made to improve the flow of aid into the Gaza Strip, Israel may argue that it's already taking steps to meet the court's demands.
But even if the situation eases - and there's no sign yet - the fact remains that Israel still stands accused of genocide, a case the ICJ believes is plausible and thus worthy of further detailed consideration.
Israel, a country born out of the ashes of the world's worst example of genocide, must now live under this legal shadow until the court delivers its verdict.
- This story was first published by the BBC.