THE HAGUE (Reuters) -Judges at the U.N.'s top court were set to rule on Friday on an emergency request to order Israel to halt its offensive in the southern Gaza city of Rafah and withdraw from the enclave, in a case brought by South Africa accusing Israel of genocide.

A small group of pro-Palestinian demonstrators arrived outside the court in The Hague, waving flags and playing a rap on a boom box calling for a free Palestine.

Israel has repeatedly dismissed the case's accusations of genocide as baseless, arguing in court that its operations in Gaza are self-defence and targeted at Hamas militants who attacked Israel on Oct. 7.

An Israeli government spokesman said on the eve of Friday's decision that "no power on Earth will stop Israel from protecting its citizens and going after Hamas in Gaza".

Israel launched its assault on the southern city of Rafah this month, forcing hundreds of thousands of Palestinians to flee a city that had become a refuge to around half of the population's 2.3 million people.

Rafah, on Gaza's southern edge, has also been the main route in for aid, and international organisations say the Israeli operation has cut off the enclave and raised the risk of famine.

South Africa's lawyers asked the International Court of Justice (ICJ) in the Hague last week to impose emergency measures, saying Israel's attacks on Rafah must be stopped to ensure the survival of the Palestinian people.

The ICJ, also known as the World Court, is the highest U.N. body for hearing disputes between states. Its rulings are final and binding but have been ignored in the past. The court has no enforcement powers.

A decision against Israel could heap more diplomatic pressure on the government of Prime Minister Benjamin Netanyahu.

The chief prosecutor of the International Criminal Court - a separate court also based in The Hague - announced on Monday he had filed an application for arrest warrants against Netanyahu and Defence Minister Yoav Gallant, as well as leaders of Hamas.

Prosecutor Karim Khan accused Netanyahu and Gallant of crimes including extermination, using hunger as a weapon and deliberately attacking civilians. Israel strongly denied those charges and called on allies to repudiate the court.

South Africa's wider case at the ICJ accuses Israel of orchestrating a state-led genocide against the Palestinian people. The ICJ has not ruled on the substance of that accusation but has rejected Israel's demand to throw the case out.

In previous rulings, the court ordered Israel to prevent acts of genocide against the Palestinians and allow aid to flow into Gaza, while stopping short of ordering a halt to Israeli military operations.

Israel launched its air and ground war on Gaza after Hamas-led militants stormed into southern Israeli communities, killing 1,200 people and seizing more than 250 hostages, according to Israeli tallies. More than 35,000 Palestinians have since been killed in the offensive, Gaza's health ministry says.

(Reporting by Stephanie van den Berg and Anthony Deutsch; additional reporting by Mayaan Lubell in Jerusalem; editing by Andrew Heavens and Mark Heinrich)

By Stephanie van den Berg and Anthony Deutsch