The International Court of Justice (ICJ), the United Nations' top court, has ordered Israel to immediately halt its military offensive in the Rafah governorate of the Gaza Strip, citing concerns over the safety of Palestinian civilians. The ruling, issued on Friday, marks a significant condemnation of Israel's conduct in its ongoing war against the Palestinian militant group Hamas and deepens the country's international isolation.

The ICJ's decision comes as part of a broader case initiated by South Africa in December, which requested the court to rule on Israel's military campaign in Gaza. While the court has previously pronounced that Israel must take steps to prevent genocide against civilians trapped in the besieged enclave, it had fallen short of mandating a cease-fire until now.

In its latest ruling, the ICJ noted that circumstances in Rafah had deteriorated further since its last decision in March. "Israel must immediately halt its military offensive and any other action in the Rafah governorate," the court stated.

Israel maintains that its objectives in the Gaza Strip are not to target civilians but to eliminate Hamas, which claimed over 1,200 lives in the October 7 terror attack in Israel, according to official figures. The ensuing Israel-Hamas war has killed more than 35,000 people in Gaza, according to Palestinian health authorities there.

Despite the ICJ's ruling, Israeli Prime Minister Benjamin Netanyahu has vowed to continue the military operation to achieve "complete victory" over Hamas. The court's pronouncements, while final and without appeal, cannot be directly enforced. However, they deal heavy reputational blows and risk further isolating Israel on the international stage.

The ruling follows an urgent plea by South Africa as part of its ongoing case at the court, accusing Israel of genocidal acts in its monthslong assault on Gaza, a charge both Israel and the United States have denied. The case is expected to take years to resolve, but South Africa has sought interim orders to protect Palestinians.

An Israeli official told NBC News that the government would study the ruling before making decisions but would not accept a court order to end the war against Hamas. The decision comes just days after the International Criminal Court's chief prosecutor applied for arrest warrants for Netanyahu, Defense Minister Yoav Gallant, Hamas leader Yahya Sinwar, and others over alleged war crimes.

The ICJ's ruling has piled pressure on Israel, which is increasingly isolated despite being a close U.S. ally. Earlier this week, three U.S. allies-Spain, Norway, and Ireland-announced that they would formally recognize a Palestinian state, a move met with outrage from Israeli officials. In response, Israeli Foreign Minister Israel Katz decided to sever connections between the Spanish embassy in Israel and the Palestinians, prohibiting the Spanish consulate in Jerusalem from providing services to the Palestinians.

The Biden administration has expressed continued support for the eventual recognition of a Palestinian state but maintains that it should be realized through direct negotiations between the parties, not through unilateral recognition. However, there has been little sign of an end to the war, with hundreds of thousands of people forced to flee Rafah in recent weeks as the Israeli Defense Forces (IDF) launched ground operations in the city, despite public skepticism from Washington.

Humanitarian groups have warned of a spiraling crisis not only in Rafah but also in parts of Gaza where hundreds of thousands have fled, lacking adequate access to food, water, and other necessities. The U.S. has said that the flow of aid into Gaza has increased since it installed a temporary pier earlier this month amid concerns over closed crossings that are crucial for the flow of supplies into the enclave.