Over the past year, Israel has tried to avoid reaching a major confrontation with Hamas.

The weekly riots that begun last March have occasionally resulted in violent clashes, but Israel has repeatedly chosen to de-escalate, knowing full well that a full-fledged war will exact a heavy military and economic price, and won’t address the underlying problems in the Gaza Strip.

Likewise, Hamas wanted to avoid a real confrontation that would have only increased the despair in Gaza.

But in recent days, Hamas has apparently changed its posture. Several reasons point to why: the ongoing protests on the streets of Gaza; Egypt’s unwillingness to mediate an intra-Palestinian reconciliation; insufficient cash from Qatar; Israel’s new measures against Hamas prisoners; and perhaps the realization that the April election season is an opportune moment to extract concessions from Israel without going into war.

Whatever the reason,  Hamas has chosen to play with fire, quite literally.

Its leadership has claimed that it “accidentally” fired rockets on central Israel 11 days ago, but using this same excuse for Monday’s attack on Mishmeret would have been over the top.

This time around, Israel knew that it had no choice but to retaliate, particularly because of the civilian casualties. This time around, it was imperative to act because Israel’s deterrence had significantly eroded.

As of Monday, Israel was still trying to make sure things would not spiral out of control. Ensuing airstrikes were intense but limited; Israel wanted to exact a price from Hamas, but it didn’t want all hell to break loose (at least, not yet).

If Hamas acts with a similar degree of restraint, perhaps this round of escalation—the umpteenth such round over the past year—will not become war.

Israel sent two brigades to the border on Monday to prepare for a potential major confrontation. The move was also a message to Hamas that it should think twice before it enters a futile misadventure.

Likewise, the rocket attack on Monday was a message to Israel. It was a warning that the terrorist group could have just as easily hit the Ben-Gurion International Airport and other strategic assets. Another terrorist group, the Palestinian Islamic Jihad, can do the same.

Israel is operating under the assumption that Hamas would like to avoid all-out war; however, its senior commanders went into hiding on Monday.

Israel has also taken various steps to prepare for any eventuality. This saw the deployment of Iron Dome batteries and the reinforcement of troops near border communities in case Hamas would to launch a cross-border attack or kidnap Israelis through its tunnels.

As is the case with every round of hostilities, the first 24 hours are the most critical because this period defines the rules of the game. It’s also the time where both sides either demonstrate their determination to go to war or seek a face-saving calm.

Israel will likely try to make sure this latest escalation ends with actual gains. It cannot let Hamas’s repeated harassment of border communities with airborne incendiary devices go unpunished.

The Jewish state must also change the rules of the game by creating a secure perimeter near the border fence that would be off-limits to rioters. Above all, it must extract a clear-cut statement from Hamas in which it would pledge not to engage in rocket fire and prevent others from doing so.

Such a statement would only be issued if Hamas feels that it has something to lose. Israel must not yield on this because otherwise, hostilities will erupt yet again.

Yoav Limor is a veteran Israeli journalist and columnist for Israel Hayom.