The United Nations agency for Palestinian refugees uncovered a tunnel belonging to Hamas under a boys’ elementary school in the Gaza Strip, according to a statement released by the organization on Friday.

The tunnel was discovered by workers of the United Nations Relief and Works Agency for Palestine Refugees in the Near East (UNRWA) on June 1 under the school, which is part of a compound comprising other schools in the Maghazi refugee camp in the Gaza Strip near the city of Deir al-Balah.

The tunnel, between two and three meters underground, passes under the Maghazi Elementary Boys A&B School and the Maghazi Preparatory Boys School, and was built both westward into the Palestinian enclave and eastward toward the security fence with Israel, according to UNRWA.

“The discovery was made during the summer vacation, at a time when the schools are empty, and in the course of work related to the construction of an extension of one of the buildings,” UNRWA said, adding that the tunnel “has no entry or exit points on the premises nor is it connected to the schools or other buildings in any way.”

The agency said it condemns “the existence of such tunnels in the strongest possible terms,” adding that it was “unacceptable that students and staff are placed at risk in such a way.”

“We demand they desist from any activities or conduct that put beneficiaries and staff at risk and undermine the ability of UN staff to provide assistance to Palestine refugees in safety and security,” the agency said.

“The construction and presence of tunnels under UN premises are incompatible with the respect of privileges and immunities owed to the United Nations under applicable international law, which provides that UN premises shall be inviolable. The sanctity and neutrality of UN premises must be preserved at all times,” the statement read.

A shell lies on the ground at the heavily damaged Sobhi Abu Karsh school in Gaza City's Shejaiya neighborhood, a Hamas stronghold, Tuesday, August 5, 2014. (photo credit: Mohammed Abed/AFP)

A shell lies on the ground at the heavily damaged Sobhi Abu Karsh school in Gaza City’s Shejaiya neighborhood, a Hamas stronghold, Tuesday, August 5, 2014. (Mohammed Abed/AFP)

The agency said it logged a complaint with the Hamas rulers and told them it intends to seal the tunnel “as an immediate priority.”

Israel’s Ambassador to the UN Danny Danon said in a statement “that the cruelty of Hamas knows no bounds as they use the children of Gaza as human shields. Instead of UN schools serving as centers of learning and education, Hamas has turned them into terror bases for attacks on Israel.”

He called on UN Secretary-General Antonio Guterres and the UN Security Council to ensure strict oversight over the UN body.

Israeli Ambassador to the United Nations Danny Danon addresses the UN Security Council on Thursday, April 20, 2017 (screen capture: YouTube)

Israeli Ambassador to the United Nations Danny Danon addresses the UN Security Council on Thursday, April 20, 2017 (screen capture: YouTube)

“The UN must act immediately to ensure that their structures and institutions are not being used to harbor the terror infrastructure of Hamas,” Danon said.

Hamas on Friday denied the UNRWA report, with spokesman Fawzi Barhoum saying the group “strongly condemns UNRWA’s allegations.” Barhoum also said Hamas clarified the issue with other groups who denied having any “resistance-related works” in the area.

The incident wasn’t the first time Hamas has used UNRWA premises for its purposes or the first time the agency has been otherwise linked to with the terror group.

Hamas is listed as a terror organization by the United States and most of Europe, including some of UNRWA’s top funders.

Israel has long claimed that some of UNRWA’s Palestinian employees support terrorist activities and spread anti-Semitism online.

In February, a UN watchdog group released a report showing screenshots from the Facebook pages of 40 UNRWA school employees in Gaza and other parts of the Mideast that it said “incite to Jihadist terrorism and anti-Semitism, including by posting Holocaust-denying videos and pictures celebrating Hitler.”

In April, the agency said a Gaza staffer suspected of having been elected to Hamas’s leadership no longer works for it but declined to clarify whether he was fired or resigned after Israel voiced its objections.

An independent UN inquiry found in 2015 that Palestinian armed groups hid weapons in three empty UN-run schools in Gaza and that in at least two cases terrorists “probably” fired rockets at Israel from the facilities during the summer war in 2014 between Israel and the Gaza Strip.