UN Secretary-General Ban Ki-Moon said on Wednesday the Israeli strikes on UN facilities in Gaza over the course of Operation Protective Edge were “outrageous, unacceptable and unjustifiable,” even if the facilities were used by Hamas to store weapons or if rockets were fired from their near vicinity.

“Yes, we uncovered cases in which weapons were stored in a small number of abandoned buildings,” he said, addressing a special General Assembly session on Gaza. “Yes, there were reports that Hamas rockets were fired from near UN premises. Yet, let me be clear: Mere suspicion of militant activity does not justify jeopardizing the lives and safety of many thousands of innocent civilians.”

He added that “international humanitarian law clearly requires protection by all parties of civilians and civilian facilities, including UN staff and UN premises… Those who violate this sacred trust must be subject to accountability and justice.”

Ban said that in one case, the IDF shelled a UN facility after the UN transferred the coordinates of the site to the army 33 times to prevent attacks on the site.

“Attacks against UN premises, along with other suspected breaches of international law, must be swiftly investigated,” he said. “Our UN flag must be respected and assure protection to those in need.”

The UN chief defended as “legitimate” Israel’s right to protect its citizens, but said “the fighting has raised serious questions about respect for the principles of distinction and proportionality in international humanitarian law.”

The Gaza destruction and death toll “shocked and shamed the world,” he said, and “nothing symbolized more the horror that was unleashed on the people of Gaza” than the shelling of UN buildings.

Operation Protective Edge must be the last Israeli offensive in the Gaza Strip, he declared.

“Do we have to continue like this: build, destroy, and build, and destroy? We will build again – but this must be the last time to rebuild. This must stop now. They must go back to the negotiating table. We must not repeat this periodically. Why [are] both parties putting all of the international community’s citizens always at unease and concerned, looking helplessly at many people being killed?”

Gaza-based sources said four weeks of fighting left 1,875 Palestinians dead, while Israel said it had killed some 900 combatants. Israel lost 64 soldiers and three civilians, including one foreign national. Operation Protective Edge was launched in a bid to halt rocket fire from Gaza at Israeli towns and cities as well as to destroy a network of tunnels, dug by Hamas under the border, that were used to launch several attacks inside Israel, killing 11 soldiers.

Hopes for an extended ceasefire were buoyed as Egypt brokered talks with Israeli and Palestinian envoys intended to address Palestinian demands to lift Israel’s blockade of Gaza and Israeli wishes to see Hamas and other Gaza factions demilitarized.

The UN General Assembly was convened at the request of Arab countries, who have criticized the Security Council for failing to adopt a strongly worded resolution to press Israel and Hamas to stop fighting.

Jordan has circulated a draft resolution in the Security Council calling for a ceasefire, a lifting of the Israeli blockade of Gaza and an investigation of attacks on UN-run schools, used as shelters by civilians.

But the document has yet to come up for a vote.

The 15-member Council adopted a statement on July 27 calling for a truce and expressing support for Egypt’s mediation efforts after the United States dropped reservations that such a text would single out Israel.

Speaking via video link, UN human rights chief Navi Pillay told the assembly that “any attacks in violation of these principles, on civilians, homes, schools and hospitals, must be condemned, and may amount to war crimes.”

Pillay stressed that there has been no accountability for the conflicts in 2008-2009 and in 2012, but she said the Commission of Inquiry established last month by the UN Human Rights Council “will help to establish clarity regarding acts committed by all parties, thus beginning to address accountability issues related to the current hostilities in Gaza, as well as to the West Bank including East Jerusalem.” Its report will be presented in March 2015 and “should be carefully considered and followed with appropriate action,” she said.

Two weeks ago, the UN Human Rights Council announced it would be launching an investigation into the conflict in Gaza, backing calls by the Palestinians to hold Israel to account despite fierce opposition from Prime Minister Benjamin Netanyahu.

AP and AFP contributed to this report.