Israel doesn’t want war. Hamas doesn’t want war. Egypt doesn’t want war. And yet this weekend’s bloodshed on the Israel-Gaza border, along with the increase in rocket fire, has brought all sides to the brink.

Activity along the border has begun to take on a worryingly south-Lebanon-type feel. It’s evident in the increasing toll on Israeli soldiers on patrol there — including the October 23 explosion in which Givati company commander Ziv Shilon was badly injured, and Saturday’s firing of an anti-tank missile at an IDF jeep 150 yards inside Israel, in which four soldiers were injured, one of them gravely.

It was evident, too, in the discovery last Thursday of a sophisticated tunnel running under the border — the kind of tunnel through which a terror cell entered Israel, attacked an army position, killed two soldiers and kidnapped Gilad Shalit in 2006. In blowing up the tunnel, Israel, unusually, sent ground forces several hundred yards into Gaza.

This weekend, those border frictions escalated into 70 rockets and mortar shells fired into Israel in the 24 hours after the jeep was hit, and six Palestinians killed in retaliatory Israeli air strikes.

Defense Minister Ehud Barak told Army Radio Sunday that “the main part of the struggle is over the fence, where they are trying to ensure that Israel not act as usual.” What Barak meant was: on the western, Gazan side of the border.

Israel patrols the fence. Hamas, Islamic Jihad, the Popular Resistance Committees and, in the type of union that only the Middle East can produce, the Marxist PFLP, have tried to ambush Israeli troops from their side of the border. They lay mines that can be detonated at passing Israeli troops and dig tunnels that can be used for ambushes and even hostage-taking missions, as was the case with Shalit, whose capture yielded the release of more than 1,000 Palestinian security prisoners five years later.

In response, Israeli security sources say, the IDF has carved out a slender corridor on the Gaza side of the fence — a 300-meter zone in which it acts to try to prevent cross-border attacks.

Hamas considers this an affront to its sovereignty. Israel wishes to present Hamas with an equation that says: either smother all terror from within your area, or face penalties that could ultimately result in a far greater loss of sovereignty — the toppling of your regime.

The IDF has at least two plans in the drawer: an invasion of Gaza that would cull the ranks of the terrorists and deplete them of much of their newly acquired ammunition; and a larger invasion, more along the lines of Operation Defensive Shield in 2002, that would aim to shake the foundations of Hamas’s hold on power.

The first would draw international condemnation. As in the winter of 2008-9, during Operation Cast Lead, Israel would enter the Strip with force; the casualty rate would be high on the Gazan side.

Perhaps this time Hamas and the other terror factions in Gaza would also be able to draw more Israeli blood, as their stockpiles of weapons, especially anti-tank missiles, has increased, notably since the fall of Muammar Gaddafi in Libya.

The upside of this would be a re-establishment of Israel’s deterrence and a crucial period of calm for Israel’s southern residents, but one that would inevitably fade, and perhaps more rapidly than last time.

The second option, a large-scale operation, would deal Hamas a major blow but likely aid Iran in its bid to unravel Israel’s strategic peace with Egypt. A Muslim Brotherhood-led government could not easily sit idly by as Israel systematically stripped its sister organization of power.

Perhaps in such a scenario, Egypt, which is saddled with economic problems and not eager for a war on its border, could intervene diplomatically. Surely, though, it would not want to be seen as acting in Israel’s interests — and would take steps to prove that this was not the case.

Moreover, in the unlikely scenario that Israel is able to push Hamas from power, the alternative would be either a Salafist government – even more extreme than Hamas, and opposed to the Brotherhood in Egypt – or widespread chaos, a void that in this region always breeds more terror.

A third option, which would be spearheaded by the Shin Bet, would be to reinstate the use of targeted killings. Former defense minister and IDF chief of General Staff Shaul Mofaz, now the leader of Kadima, seemed to be pushing for this on Sunday, charging that the current government is focusing too intensely on “protection, and not deterrence.”

When he was defense minister (in 2004), he told Army Radio, deterrence had been achieved by assassinating Hamas founder Sheikh Ahmed Yassin and 11 other top Hamas officials.

Cabinet minister Gilad Erdan was of a similar mindset. “Hamas leaders are the ones who need to start paying a personal price, not sleeping at nights. Does that mean I am of the opinion that already now we should be getting ready for a ground mission? I don’t think so. But we should return to targeted killings.”

A final, least-discussed option would be to open direct talks with Hamas. Journalist Shlomi Eldar recently published a book, “Knowing Hamas,” in which he reported that the head of the political wing of the organization, Khaled Mashaal, offered Israel two options during the Shalit negotiations — one that dealt solely with the hostage Israeli soldier and one which offered to examine the possibility of a 25-year truce in return for a Palestinian state on 1967 lands.

Barak evidently does not favor such an approach, at least not now. “We are not in North America or Western Europe,” he reminded listeners in his Army Radio interview. “This is an environment where there is no grace for the weak.”