Hours after the latest Gaza flare-up drew to a close on Wednesday, defense officials were upbeat, saying Israel should be satisfied with the results. The officials said that Hamas, which has controlled the Gaza Strip since 2007, was taken off-guard by the intense nature of the fighting.

Islamic Jihad fired a barrage of some 30 mortars towards Israel on Tuesday morning, which triggered the most aggressive escalation since the 2014 Gaza war. According to defense officials, Hamas signed off on the barrage ahead of time so as to let the Islamic Jihad exact revenge for an incident earlier in the week, in which Israel killed three of its members when they tried to plant an explosive device near the Gaza border fence.

However, despite the initial green light, Hamas was taken aback by the large number of mortar bombs fired at Israel and was also surprised by the Israeli retaliation, which included some 30 daytime sorties targeting Hamas and Islamic Jihad targets.

Officials believe that Islamic Jihad dragged Hamas into a military confrontation it did not actually want. As a result, Hamas fired rockets towards the Israeli communities near the Gaza Strip—a step it has not taken since the conclusion of the 2014 war, not even in cases where Israel successfully destroyed cross-border Hamas tunnels (10 in total) or when more than 100 Palestinians storming the Gaza fence were killed over the course of several weeks in weekly border protests.

This unusual decision to fire at Israel may have been taken in order to shed the notion that Hamas is collaborating with Israel.

Hamas initially asked for a cease-fire at 9 p.m. on Tuesday; the request was made through Egyptian intelligence officials. It also leaked the request to Arab media.

Hamas went on to declare a cease-fire, but at about midnight on Tuesday, an Israeli official said no such agreement had been reached. This was followed by an Israeli Air Force attack on Gaza overnight. Targets included storage facilities for SA-7 anti-aircraft shoulder missiles, a facility for suicide drones and a site used by Hamas naval forces that held sophisticated amphibious devices.

At 1:30 a.m. on Wednesday, Hamas and Islamic Jihad decided to unilaterally stop firing at Israel. To enforce this decision, Hamas deployed its people in various launching positions to prevent further attacks. For the next few hours, this effort was largely successful, but at 5:20 a.m., the rogue factions known as the Popular Resistance Committees and Global Jihad fired the last salvo.

Israeli officials believe that Hamas initially felt less deterred when it came to firing rockets and mortars, but ultimately realized that it had made a mistake and begged for a cease-fire.

“There is no cease-fire agreement with Hamas or Islamic Jihad,” one Israeli official said, however. “Israel is not bound by anything; if a new tunnel is discovered, it will be destroyed, and if terrorists approach the fence, they will be killed.”