JERUSALEM • On Sunday, Prime Minister Benjamin Netanyahu assured Israelis weary of conflict with Palestinians in the Gaza Strip that he was "doing everything I can in order to avoid an unnecessary war".
Twenty-four hours later, Israel appeared to be on the brink of just that.
After a botched intelligence mission by undercover commandos left seven Palestinian fighters dead, the militant group Hamas and other armed factions mounted an intense and escalating rocket and mortar barrage across much of southern Israel.
With air-raid sirens wailing from the Mediterranean to the Dead Sea, and after a Palestinian anti-tank missile blew up an Israeli bus, seriously wounding a 19-year-old soldier, Israel retaliated with airstrikes and tank fire that grew steadily more destructive as the night wore on.
Israel hit scores of military posts and weapons caches across Gaza, but also levelled a Hamas television station, radio station and office building, and the group's military intelligence headquarters. It was the heaviest fighting between Israel and Gaza since their war in 2014.
The fighting threatened to scuttle months of multilateral talks aimed at calming the Israel-Gaza border, where protests since March have been met with a lethal Israeli response. Some 170 Palestinians have been killed and thousands more wounded.
The talks, mediated by Egypt, had already produced concrete steps to ease tensions in Gaza, including increased electrical power and the influx of millions of dollars in aid.
So why, some Israelis were asking on Monday, with the Israeli government under pressure to ease tensions in Gaza and the talks showing progress, would the government risk it all for what officials described as a fairly routine surveillance mission?
The answer, analysts said, may be that it was so routine. No one expected the Israeli commando squad to be exposed.
The cost of the tiny risk of exposure became evident on Monday.
More than 400 rockets and mortar shells were fired into Israel, and the Israeli military said it had struck more than 70 military targets in Gaza belonging to Hamas, which governs the territory, and to Palestinian Islamic Jihad.
The authorities in Gaza said three Palestinians had been killed in the Israeli air strikes and nine others were wounded. One Israeli was killed and at least 16 were wounded on Monday.
The fighting began hours after Palestinians and Israelis buried combatants who were killed on Sunday night, after an Israeli intelligence mission inside the Gaza Strip went awry when a team of covert operatives was challenged by Hamas fighters. A gunfight erupted and the team called in air strikes to cover its escape.
Six Hamas fighters were killed. An Israeli lieutenant-colonel in the elite Maglan unit, a commando brigade, was also killed in the clash.
According to a former Israeli official with knowledge of the operation, the mission's goal was surveillance, not an assassination. Such missions, usually aimed at installing surveillance equipment, are extensively planned and are considered at a low risk of exposure and confrontation.
Israeli officials have not publicly explained the mission or what went wrong with it.