The army has beefed up its legal staff, is conducting internal investigations of its wartime actions and has prepared a detailed PR campaign of satellite photos and video clips – hoping to persuade the world that its war against Hamas was justified.

Israel may face legal ramifications for the destruction of thousands of homes in Gaza. (Photo: Reuters)

"We take our business seriously, and as such we operate within the rules and regulations under the laws of war," said Lt. Col. Peter Lerner, a military spokesman.

Israel launched the war on July 8 with a massive aerial bombardment of Gaza in response to weeks of heavy rocket fire. It later sent in ground troops to destroy a network of tunnels used by Hamas militants. Hamas and other militant groups fired thousands of rockets and mortars into Israel.

More than 2,100 Palestinians were killed in the 50 days of fighting, most of them civilians, according to UN and Palestinian estimates. Thousands of buildings were destroyed and tens of thousands of people were left homeless. Seventy-two people were killed on the Israeli side, including six civilians.

Israel argues that the heavy civilian death toll is Hamas' fault, accusing the militant group of launching rockets – and drawing retaliation - from school yards, residential areas and mosques. This claim will be central to any defense of the military's conduct.

"What the military has been doing throughout the entire operation is showing Hamas as it truly is, an organization that hides behind civilians and intentionally locates its weapons in houses, schools and mosques," Lerner said.

The argument will be weighed against the principle of proportionality – which is essentially a judgment call on whether the force applied was reasonable.

Israel counters claims that the IDF committed war crimes in Gaza, citing the thousands of Hamas rocket launched on Israeli civilians during the operation. (Photo: Reuters)

Mushir al-Masri, a Hamas official in Gaza, dismissed the Israeli allegations, saying the claims that Hamas used houses and mosques for attacks are "to cover the brutal crimes they committed" in Gaza. "The war on Gaza was live on TV screens and the world saw who was under the rubble of the houses and who was killed in the schools," he said.

The threat of international action against Israel is real. Following a similar military operation in 2009, a UN fact-finding mission headed by South African jurist Richard Goldstone found strong evidence that both Israel and Hamas had committed war crimes – Israel by deliberately or recklessly targeting Gaza civilians, and Hamas by launching indiscriminate rocket attacks at Israeli cities. While Goldstone later backtracked from his main conclusions, the report was never changed.

The UN Human Rights Council, which has a long history of criticizing Israel, has already appointed a commission of inquiry to look into the latest fighting. The commission's report is expected next March.

Western-backed Palestinian President Mahmoud Abbas is also threatening to seek membership in the International Criminal Court in order to press charges against Israel. Officials say he will do so if he fails to persuade the UN Security Council this month to impose a deadline for Israel to withdraw from occupied lands and establish a Palestinian state. The US, which wields veto power in the council, has already reacted coolly to the Palestinian plan.

Turning to the ICC will be risky: Israel could retaliate, and Abbas could lose Western support and expose Hamas – with which he has been trying to reconcile – to the same charges.

Israel has long complained that it is unfairly singled out by what it sees as biased UN institutions and international bodies. It says that if standards were applied consistently, countries like the US, Britain, or Russia would also be called to task for their actions in places like Iraq and Ukraine.

Still, unlike in 2009, Israel appears to have decided not to boycott the Human Rights Council. Instead, it is vigorously mounting a defense, though it remains unclear to what extent it will cooperate with the probe.

"Now that the dust has cleared, we are doing the important work to document exactly what happened," said government spokesman Mark Regev.

Evidence collected includes video clips claiming to show rocket launches next to schools and mosques, "sensitive sites" that Israel decided not to attack and a Hamas training manual, allegedly captured in the fighting and instructing militants how to hide in civilian areas. The authenticity of the manual could not be independently verified.

Even during the fighting, the army says it had a team of legal experts reviewing operations, and often approving attacks after determining they met international laws of war.

The military has launched an investigation into its wartime conduct headed by a major general and has brought in legal and military experts – who did not participate in the war themselves.

In a briefing with reporters this week, a senior intelligence official compared Hamas to a well-trained army, with some 16,000 soldiers and thousands of sophisticated weapons.

He said he was impressed by its tactics and organization.

Many of the group's weapons were imported from abroad, while other locally made rockets used Iranian or Syrian "know-how." He also showed off a glossy hardcover book, purportedly confiscated from a Hamas post, with in-depth details of the Israeli military's units and commanders.

He spoke on condition of anonymity under military briefing guidelines.

The official said that Israel is conducting a painstaking process of trying to identify how many militants and how many civilians were killed. While Palestinians say roughly three-quarters of the dead were civilians, Israel says the balance is closer to half and half.

The official said Israel was certain 616 militants were killed. "We have the proof, the full name, certain that they are terrorists for sure," he said. He said it is certain that 706 civilians were killed – leaving 800 or so in question.

The official said Israel makes its determination by cross-checking the names issued by the Palestinian Health Ministry with other sources, including intelligence files, the Israeli military liaison body that deals with the Palestinians, as well as Palestinian hospitals and other sources.

He said all rulings require "at least two sources," but that when the investigation is complete, he expects the ratio to remain the same.

The official said compiling these figures is important for various reasons, including international opinion. "I have to say it very frankly, because it's a big issue in the world," he said