The International Court of Justice (ICJ) is to deliver an advisory opinion on Israel's legal obligations towards UN agencies and other international organisations operating in the occupied West Bank and Gaza Strip.

The UN's top court received a request from the General Assembly late last year, after Israel's parliament passed laws banning any activity by the UN agency for Palestinian refugees (Unrwa) on Israeli territory and contact with Israeli officials.

Israel accused Unrwa of being infiltrated by Hamas. The agency denied the claim, insisting it was impartial.

The ICJ was asked to also cover in its opinion Israel's duty to allow the unhindered delivery of essential supplies to Palestinians.

Israel tightened its blockade on Gaza after the start of its war with Hamas two years ago and has since restricted - and at times completely stopped - the entry of food and other aid for the 2.1 million population.

Before this month's ceasefire deal, UN-backed global experts had estimated that more than 640,000 people were facing catastrophic levels of food insecurity and that there was an entirely man-made famine in Gaza City. Israel rejected the findings, insisting it was allowing in sufficient food. It also blames Hamas for stealing aid.

The ICJ's panel of international judges was asked to clarify two questions in the resolution passed by the UN General Assembly in December. Firstly, whether Israel's ban on Unrwa breaches UN conventions guaranteeing the independence of UN agencies. Secondly, whether Israel's restrictions on aid crossings into Gaza violate international humanitarian law, including its duties as an occupying power to protect civilians.

While the opinion will be a non-binding legal clarification, it carries significant moral and diplomatic weight.

At the start of the hearings at The Hague in April, the UN's Under-Secretary General for Legal Affairs Elinor Hammarskjöld told the court that, as the occupying power in the West Bank and Gaza, Israel's obligations entailed allowing and facilitating all relevant United Nations entities to carry out their activities for the benefit of the local population.

These activities included relief schemes, such as the provision of foodstuffs, as well as caring for and educating children, and maintaining medical services, she said.

Israel considers this ICJ procedure a political circus and abuse of international law and institutions. It filed a written statement saying the court's involvement undermined its self-defence and counterterrorism rights under international law.

Unrwa - the largest humanitarian organisation in Gaza, with 12,000 Palestinian staff - has challenged Israel's allegation that it knowingly has Hamas members in its ranks, or that it co-operated with the armed group. Since the Israeli laws took effect in January, Unrwa says its Palestinian staff have continued providing assistance and education, health and other services to Palestinians in Gaza and the West Bank, including East Jerusalem.

This hearing is therefore about far more than Unrwa: it is about whether the international system can still enforce its own rules when a major UN member state challenges the legitimacy of UN institutions operating under its authority.