The European Union on Wednesday backed a United Nations demand for an independent probe into the reported discovery of mass graves at two Gaza hospitals destroyed in Israeli sieges.

"This is something that forces us to call for an independent investigation of all the suspicions and all the circumstances, because indeed it creates the impression that there might have been violations of international human rights committed," EU spokesman Peter Stano said.

"That's why it's important to have independent investigation and to ensure accountability."

The UN rights office said Tuesday international investigators should be involved in a probe into the discovery of the bodies.

The UN rights office said it was "horrified" by the destruction of Gaza's two biggest hospitals, Al-Shifa in Gaza City and the Nasser Medical Complex in Khan Yunis.

Gaza's Civil Defence agency said Tuesday that health workers uncovered nearly 340 bodies of people allegedly killed and buried by Israeli forces at the Nasser complex.

Israel's army called claims that its troops had buried bodies during its operation at Nasser "baseless and unfounded".

The army has said around 200 militants were killed, and weapons stockpiles recovered, during its operation at Al-Shifa.

Around 30 bodies were reported found buried in two graves in the Al-Shifa courtyard.

Hospitals, which have protection under international law, have repeatedly come under Israeli bombardment over more than six months of war in Gaza.

Israel has accused Palestinian militant group Hamas of using medical facilities as command centres and to hold hostages abducted during its attack inside Israel on October 7 which set off the war. Hamas has denied the claims.

The October 7 attack resulted in the deaths of around 1,170 people in Israel, according to an AFP tally of Israeli official figures.

In retaliation, Israel launched a military offensive that has killed at least 34,183 people in Gaza, mostly women and children, according to the Hamas-run territory's health ministry.