With a 72-hour truce between Israel and the Gaza Strip taking hold after a month of bitter fighting, civilians from both sides tentatively returned to their hometowns as the full scope of the conflict emerged.

Just minutes before the truce took hold, sirens wailed in Jerusalem and Tel Aviv as Hamas fired 16 rockets over the border, while Israeli warplanes carried out at least five strikes on Gaza.

But at 8 a.m. on Tuesday, the guns fell silent after 29 days of deadly fighting, bringing relief to millions as both sides counted the cost from a conflict that killed at least 1,867 people in the Gaza Strip — according to estimates based on figures given by Hamas — and 67 people in Israel, all but three of them soldiers.

The UN and Gaza human rights groups monitoring the death toll have said more than 75 percent of those killed in Gaza were civilians. But an Israeli military spokesman, Lt. Col. Peter Lerner, said Tuesday that about 900 Palestinian terrorists had been killed by Israeli forces during the war.

In a conversation with The Associated Press on Sunday, another military official had said at least 300 terrorists were killed. Lerner said the figure of 900 terrorists killed was an approximation, based on reporting from individual Israeli units, but provided no further detail. Later, the army said between 750 and 1,000 militants had been killed.

A tank along the Gaza-Israeli border on July 18 (photo credit: Edi Israel/Flash90)

A tank along the Gaza-Israeli border on July 18 (photo credit: Edi Israel/Flash90)

About 400,000 Gazans are said to have been displaced due to the destruction wrought by Israeli shelling, as Israel sought to tackle Hamas rocket-launchers and tunnels located in and near homes, school, mosques and throughout Gaza neighborhoods.

The almost-month-long war also saw several attempts at ceasefires, which were broken after a few hours. This time, however, the lull was more enduring, with both sides saying they were committed to the ceasefire. It was the second time in four days that the two sides had agreed to observe a 72-hour humanitarian truce. The last attempt on August 1 — brokered by Washington and the UN — was shattered within just 90 minutes when Hamas attacked IDF forces in Rafah on Friday morning, killing three soldiers.

As the truce went into force, Israel confirmed it had pulled out most of its troops, ending a nearly three-week ground operation.

Lerner said troops would be “deployed in defensive positions” outside Gaza and would respond to any violation of the truce.

In the West Bank city of Ramallah, deputy economy minister Taysir Amro said the 29-day war had caused damage of up to $6 billion.

The army calculated it destroyed 32 cross-border tunnels, 14 of which crossed into Israel and 2 of which had shafts located 300-500 meters from Israel. Eleven IDF soldiers were killed by Hamas gunmen emerging from the tunnels into southern Israel.

The IDF also said it had struck nearly 4,762 terror targets — most of them rocket-launching sites, nearly 1,000 of them command and control centers, about 240 Izz ad-Din al-Qassam Brigades buildings, nearly 200 weapons storage and manufacturing facilities, nearly 150 terror training compounds and 1,535 additional terror sites.

“They were part of a strategic plan of Hamas, and an investment of approximately $100 million worth of materials, and we have now removed that threat,” Lerner said of the tunnels.

Of the rockets that were consistently launched at Israel in recent years, Lerner said: “We struck just over 3,000 rockets; they launched over 3,300 rockets and we expect that they still have about 3,000 rockets left. This is a challenge we have to address.”

An Iron Dome Missile Defense battery set in the Ashdod area, fires an intercepting missile, on July 13, 2014. (Photo credit: David Buimovitch/Flash90)

An Iron Dome Missile Defense battery set in the Ashdod area fires an intercepting missile, on July 13, 2014. (Photo credit: David Buimovitch/Flash90)

The IDF announced Tuesday that, in the 29 days since the start of Operation Protective Edge, terrorists in the Gaza Strip fired 3,356 rockets at Israel, 2,303 of which hit Israeli territory, 116 in populated areas; 356 were intended to target IDF forces operating in the Gaza Strip. A total of 578 rockets were intercepted by the Iron Dome missile-defense system, and 475 landed within the Gaza Strip.

Most of the rockets — just under 70 percent — were fired from the northern Gaza Strip; 12.9% were fired from the central Gaza Strip; and 17.3% were fired from its southern region. The military said 597 rockets were launched from civilian facilities, approximately 260 were launched from schools, 127 from cemeteries, 160 from religious sites such as mosques, and 50 from hospitals.

“Prior to the operation, the IDF estimated the Gaza rocket arsenal at approximately 10,000, one-third of which were fired at Israel, and an additional one-third was demolished by the IDF,” according to a military statement released on Tuesday evening.

The IDF said it had transferred 1,856 trucks of humanitarian aid to Gaza, carrying 40,550 tons of food, medical and humanitarian supplies.

The IDF called up 82,201 reserve soldiers to serve in the Gaza Strip or to take the place of soldiers deployed to the Gaza Strip. Many of the reserve soldiers were released in recent days.

Now, the situation on the ground remains volatile, and any ceasefire violation could quickly derail indirect Cairo talks between Israeli and Palestinian delegations.

Meanwhile, as Tuesday’s truce took effect, residents returned to devastated areas to inspect the damage.

One of the hardest-hit areas of recent days was the southern Gaza town of Rafah, which had come under several days of heavy Israeli shelling and airstrikes which began Friday, after Israel suspected Israeli soldier Hadar Goldin had been captured by Hamas. Israel later determined that the soldier had been killed in battle that day, in the Hamas ambush that broke a UN- and US-brokered ceasefire.

Smoke rises following an Israeli strike on Rafah, in the southern Gaza Strip, on August 3, 2014. (photo credit: AFP/Mahmud Hams)

Smoke rises following an Israeli strike on Rafah, in the southern Gaza Strip, on August 3, 2014. (photo credit: AFP/Mahmud Hams)

The conflict began July 8, but was preceded by several weeks of tensions. The current round of confrontations began with the June 12 abduction-killing of three Israeli teens in the West Bank, blamed by Israel on Hamas, followed by the apparent revenge killing of a Palestinian teen, the roundup of hundreds of Hamas activists by Israel, and barrages of Gaza rocket fire on Israel.

Israel launched airstrikes it said were aimed at stopping the rocket fire. It expanded the operation July 17 by sending in ground forces, in what it described as a mission to destroy the network of tunnels dug by Hamas under the border.

AP and AFP contributed to this report.