Israel breathed a sigh of relief on Wednesday as a military operation which could have gone one of two ways avoided a ground war.

As the Egyptian-brokered ceasefire came into effect, tens of thousands of Israeli ground troops, many of them reservists who had been summoned days earlier from their homes, were stood down.

Just hours before, hundreds of tanks and armoured personnel carriers had been poised on the border of Gaza.

With the cessation of hostilities it became clear that operation Pillar of Defence had achieved its aim. And — a rarity for Israel in recent years — it had done so without alienating Western opinion formers.

At the start, Defence Minister Ehud Barak set out four aims: to restore fundamental Israeli deterrence; to hack back the Palestinians’ ability to launch missiles at Israel; to hobble the “terror infrastructure” in Gaza; and to restore calm to Israelis living in the south.

The ceasefire agreed on Wednesday was based on an assurance from Hamas that it would not launch missiles on Israel and would prevent other Palestinian ogranisations from carrying out attacks.

Hamas and Islamic Jihad have lost key commanders and fighters, as well as much of their arsenal, and Israelis in the south now look set to have a rare period of peace.

At a joint press conference with Prime Minister Benjamin Netanyahu and Foreign Minister Avigdor Lieberman on Wednesday evening, Mr Barak said that “the objectives have been fully realised.”

Israel’s Iron Dome defence system was estimated to have had a near 90 per cent success rate, intercepting 347 rockets and preventing untold damage and loss of life. Only six Israelis were killed during the operation.

Around 140 Palestinians are estimated to have been killed in Israeli air-strikes, although a significant number were members of terror organisations.

The involvement of Egyptian President Mohammed Morsi, who hosted the ceasefire talks, is seen by the Israeli government as a highly positive development.

Foreign Minister Avigdor Lieberman was uncharacteristically complimentary, saying that “it is important to note the responsible role played by Egypt and to say a word of thanks to President Morsi”.

Unusually for an Israeli military campaign, the international response from politicians and major news outlets was generally supportive. Both US President Barack Obama and British Foreign Secretary William Hague said early on that Israel had a right to defend itself from rocket fire and neither wavered from that line

Meanwhile, Israel mobilised a huge social media campaign, providing major news outlets with real-time information about the conflict. As a result coverage was far more balanced than four years ago during Operation Cast Lead, when Israel last went into Gaza. As the ceasefire deadline passed on Wednesday, Palestinian groups launched a final few rockets towards Sderot and Ashkelon, to make a point, but the number of launches had been decreasing over the previous two days.

Seven days of intense warfare between Israel and Gaza were over and the Israeli plans to launch a ground offensive were put on hold.

Hamas received a number of concessions in the Egyptian-brokered ceasefire agreement, including the opening of crossings from the Strip and limits on Israeli military operations on the Gaza border perimeter, though the exact details have yet to be agreed.

Political campaigning was suspended for the last week in Israel. “The motives for the operation were strategic and not political,” said one senior Likud politician, “but obviously Netanyahu couldn’t go for elections with 100 missiles falling daily on the south.”

So far, opinion polls conducted since the start of the operation have shown no major changes. The bloc of right-wing and religious parties is predicted to have a majority which will allow Mr Netanyahu to form another coalition.

The prime minister seemed concerned that he would be accused by voters of ending the operation early. “We have exacted a heavy price from the terror organisations,” he said. “They thought we would not act against them forcefully and they were wrong.” He acknowledged that some Israelis would have preferred the operation to continue with a devastating ground offensive, but “we used military power with diplomatic consideration.”

The decision to launch Operation Pillar of Defence was made by the so-called Inner Cabinet of nine senior ministers on November 13. Israeli intelligence had seen Hamas’s hand in a number of operations against its troops on the Gaza border. The trigger was Hamas’s decision to join other Palestinian groups in firing rockets towards Israel, and co-ordinating such attacks.

The warm ties with the new government in Egypt emboldened Hamas, creating a false feeling of immunity. “Hamas miscalculated,” said an Israeli intelligence analyst, “they thought Israel would be afraid of Egypt’s response. They certainly did not expect such a devastating response.”