The International Court of Justice (ICJ) has ordered Israel to halt its military offensive inside Rafah in southern Gaza in a landmark ruling which is unlikely to have any impact on the ground.
South Africa had asked the United Nations' top court, located in The Hague, to impose new emergency measures on Israel's military campaign in Rafah, saying it must be stopped to ensure the survival of the Palestinian people.
Israel began its invasion of parts of Rafah earlier this month and at least 800,000 Palestinians have fled from the city since.
The ICJ said its ruling was influenced by the deteriorating humanitarian situation inside Gaza, calling it "disastrous".
South African Department of International Relations and Cooperation director-general Zane Dangor said his country welcomed the ruling.
"This order is ground-breaking as it is the first time that explicit mention is made for Israel to halt its military action in any area of Gaza," he said.
The ICJ also ordered Israel to open the Rafah crossing between Egypt and Gaza, which the country's military recently took control of, to allow humanitarian aid into the strip.
On top of that, the court ordered Israel to let UN investigators into Gaza and report back on its progress in all areas within a month.
The ICJ's 15 judges voted 13-2 on all measures. The dissenting voices were from Israel itself and Uganda.
While the ICJ's rulings are considered binding, the court has no power to enforce them.
Israel has previously indicated it would continue its military campaign in Gaza, despite any ruling.
In Israel, some MPs criticised the ICJ decision, highlighting the fact it did not connect an end to fighting in Gaza with the return of Israeli hostages Hamas took in its October attack.
Israeli war cabinet minister Benny Gantz said his country was "committed to continue fighting to return its hostages and promise the security of its citizens — wherever and whenever necessary — including in Rafah".
Hamas official Basem Naim said the militant group welcomed the ICJ's ruling, but said it also wanted Israel to stop its attacks on other parts of Gaza, not just Rafah.
The ruling is part of a wider case brought by South Africa accusing Israel of genocide, which Israel has consistently denied. An overall ruling on that will likely take much longer; potentially years.
While the ICJ imposed several provisional measures in March in a bid to limit the suffering in Gaza and ensure evidence of potential genocide was not destroyed, the court's president Nawaf Salam on Friday told the hearing they were no longer sufficient.
Hundreds of thousands of displaced Palestinians have sought shelter in Rafah over the course of the seven-month war, while other areas of the Gaza Strip were attacked.
An IDF spokesperson has said the army was operating "carefully and precisely" in Rafah now.
At a hearing last week, South Africa's lawyers told the court Israel's attacks on Rafah "must be stopped".
Israel claims its operations in Gaza are about protecting its own citizens from Hamas militants who attacked Israel on October 7.
Palestinian Authority spokesperson Nabil Abu Rudeineh said the ICJ's decision represented the "international consensus on the demand to stop the all-out war on Gaza".
While Israel is unlikely to abide by the ruling, legal pressure is mounting.
Separately, the top prosecutor for the International Criminal Court (ICC) revealed earlier this week he was seeking arrest warrants for Israel's Prime Minister Benjamin Netanyahu and Defence Minister Yoav Gallant, as well as Hamas leaders Yahya Sinwar, Ismail Haniyeh and Mohammed Diab Ibrahim Al-Masri.
The court could take several months to make a decision on whether to grant them.
The ICC and ICJ are both based in The Hague but have different functions. The ICC prosecutes individuals over matters like alleged war crimes, while the ICJ rules on disputes between states.