Two weeks after the end of the Gaza war, there is growing evidence that Hamas militants used residential areas as cover for launching rockets at Israel, at least at times. Even Hamas now admits "mistakes" were made.

But Hamas says it had little choice in Gaza's crowded urban landscape, took safeguards to keep people away from the fighting, and that a heavy-handed Israeli response is to blame for the deaths of hundreds of Palestinian civilians.

"Gaza, from Beit Hanoun in the north to Rafah in the south, is one uninterrupted urban chain that Israel has turned into a war zone," said Ghazi Hamad, a senior Hamas official in Gaza.

Story continues below advertisement

Increasingly, the discussion is not about whether the Hamas rockets were fired from civilian areas, but exactly how close they were to the actual buildings.

"The Israelis kept saying rockets were fired from schools or hospitals when in fact they were fired 200 or 300 metres (yards) away. Still, there were some mistakes made and they were quickly dealt with," Hamad told The Associated Press, offering the first acknowledgment by a Hamas official that, in some cases, militants fired rockets from or near residential areas or civilian facilities.

The questions lie at the heart of a brewing international legal confrontation: Did Hamas deliberately and systematically fire rockets at Israel from homes, hospitals and schools in the hope that Israel would be deterred from retaliating, as Israel claims? Or did Israel use force excessively, resulting in deaths among people not involved in combat operations?

The answers could help determine whether Israel — or Hamas — or both are ultimately accused of violating the international laws of war in a conflict that caused tremendous damage.

According to Palestinian figures, nearly 2,200 Palestinians were killed — roughly three quarters of them civilians and including more than 500 children — and 11,000 were wounded. The war also left some 100,000 homeless. Seventy-two people were killed on the Israeli side, including six civilians.

Ahead of a UN investigation, the Israeli military has released reams of evidence, including satellite photos and aerial footage, to support its claims that it acted responsibly and attempted to minimize Palestinian casualties. It asserts that Hamas made no effort to disguise its attempt to maximize Israeli civilian casualties.

Throughout the war, the Israeli air force compiled dozens of video clips showing alleged wrongdoing by Hamas, an Islamic militant group sworn to Israel's destruction.

Story continues below advertisement

These videos, many of them posted on YouTube, appear to show rockets flying out of residential neighbourhoods, cemeteries, schoolyards and mosque courtyards. There are also images of weapons caches purportedly uncovered inside mosques, and tunnels allegedly used by militants to scurry between homes, mosques and buildings.

"Hamas' excuses are outrageous, misleading and contrary to the evidence supplied by the IDF (Israeli Defence Forces) and the reality documented by international journalists on the ground in Gaza," said Lt. Col. Peter Lerner, an Israeli military spokesman.

But a black-and-white satellite image released by the Israeli military illustrates the difficulties in proving the point. The army says the image, taken of the Gaza City neighbourhood of Sheikh Radwan, shows four rocket launch sites sitting next to a cluster of schools and a nearby residential neighbourhood.

Such images, it says, are evidence that Hamas used built-up areas for cover — and carelessly exposed civilians to danger in Israeli retaliatory strikes. However, the image itself is grainy and shows no clear signs of rocket activity, though rocket launchers are often hidden underground. The army refused to say how it had made its conclusions.

A visit to the area this week found three separate military sites — possibly training grounds — slightly larger than football fields located close to the state schools.

The sites are mostly concealed from street view by barriers made of corrugated iron, but one bore the sign of Hamas' military wing, al-Qassam Brigades, while another bore the sign of the Islamic Jihad, a militant group allied with Hamas. The bases were deserted. Visible from the outside were human cutout figures and what appeared to be exercise hurdles.

Story continues below advertisement

There were no overt signs of rocket launchers or craters in the ground outside, though dirt appeared to have been disturbed either by some sort of blast or the work of heavy military-type trucks. There were pieces of mangled concrete scattered on the ground. The school buildings appeared untouched.

Hamas tightly restricts access to such facilities, and it was impossible for photographers to enter the sites. Israel confirmed the area was targeted in airstrikes.

Another location identified by the Israeli military as a rocket-launching site is in northern Gaza around the newly built Indonesian hospital. Immediately to the north of the two-story hospital and across the road to the west are two Hamas military facilities. Both stand in close proximity to residential homes. The hospital stands intact, while nothing is visible from inside the bases.

Hamad, the Hamas official, argued that many of the buildings shown in Israeli videos were either a safe distance from the rocket launchers or that the buildings had been kept vacant during the fighting.

The ground in Sheikh Radwan, for instance, lies some 150 metres (yards) away from the neighbourhood, and the schools were empty for summer vacation.

During 50 days of fighting, many observers witnessed rocket launches from what appeared to be urban areas. One piece of video footage distributed by the AP, for instance, captured a launch in downtown Gaza City that took place in a lot next to a mosque and an office of the Hamas prime minister. Both buildings were badly damaged in subsequent Israeli airstrikes.

Story continues below advertisement

There was other evidence of Hamas having used civilian facilities: Early in the conflict, the UN agency that cares for Palestinian refugees announced that it discovered weapons stored in its schools as they stood empty during the summer.

"I don't think there's any doubt urban areas were used to launch rockets from in the Gaza Strip," said Bill Van Esveld, a senior researcher at Human Rights Watch. "What needs to be determined is how close to a populated building or a civilian area were those rocket launches."

The issue may never be conclusively settled as both sides voice competing narratives over their conduct in the deadliest and most ruinous of the three wars since Hamas seized control of Gaza in 2007.

"Yes, Hamas and others may have used civilians as human shields, but was that consistent and widespread?" said Sami Abdel-Shafi, a Palestinian-American who represents the Carter Center in Gaza. "The question is whether Israel's response was proportionate."

The war erupted on July 8 when Israel launched a massive aerial bombardment of Gaza in response to weeks of heavy rocket fire by Hamas and other Gaza-based militant groups — part of an escalation that began with the killing by a Hamas cell of three Israeli teens in the West Bank.

The Israeli army says Hamas fired almost 4,000 rockets at Israel, including 600 from close to schools, mosques and other civilian facilities, and scores of mortar shells. Israel carried out some 5,000 airstrikes, in addition to using powerful artillery and gunship fire.

Story continues below advertisement

Frequently, Israeli arms struck hospitals, schools, homes, mosques, factories and office towers. Israel said the buildings had been used for cover by militant fighters, and that whenever possible, it provided warning to civilians that strikes on their buildings were coming.

Israel disputes the makeup of the Palestinian casualty figures, saying that nearly half the dead were militants.

Nevertheless, the death toll and number of civilian deaths have led to harsh condemnations of Israel and raised questions on the proportionality of Israel's response. In an apparent attempt to head off international investigations, the Israeli military said Wednesday it has opened criminal investigations into two high-profile cases involving Palestinian civilian casualties.

Hamas also has been sharply criticized for launching rockets aimed at Israeli cities and towns. Israel says its own civilian death toll would have been much higher had it not been for its rocket defences.

The UN Human Rights Council has appointed a commission to look into the latest fighting. Its report is expected no sooner than March.