For several days now, Hamas has been signaling its willingness to reach a ceasefire. Monday overnight saw militant groups in the Gaza Strip almost refraining completely from firing rockets.
While a salvo late Tuesday was specifically aimed at six Israel Air Forces bases in the south, most launches in the past few days have not targeted Israeli population centers.
The IDF has also been attacking less and less important targets in the Strip.
All of this points to the fact that Operation Guardian of the Walls has essentially achieved its goals: restoring Israel's deterrence and weakening Hamas – at least as much as possible.
It is safe to assume that the IDF is less than a day away from achieving all it can with only an aerial campaign and without a ground operation.
Even so, the operation's three key strategic objectives have yet to be achieved: stable long-term deterrence against Palestinian terror groups, preventing Palestinian Islamic Jihad and Hamas from further rearming and removing Hamas from its newly gained political, national and religious leadership position not only for the Palestinians, but for Israel's Arabs as well.
Israel can still accomplish these goals, but only if it conducts the diplomatic battle to come wisely.
It must do this not only to discourage Palestinian terror groups from attacking Israel for years to come, but to also deter Lebanon's Hezbollah and its Iranian sponsors and to improve Israel's position on the regional and global stages.
Therefore, this operation should end through negotiations with Hamas in which the Islamist group can make demands and bargain for them.
Israel's past experience in bargaining with Hamas show that the longer the talks go on, the longer the military operation lasts, risking any gains. Besides, the terror group ultimately always refuses to abide by its commitments anyway.
With that in mind, the end of this campaign should be as gradual and as one-sided as Israel can make it and follow three clear steps:
1. Impose conditions on Hamas
First, Israel must declare a unilateral ceasefire. Israel will inform the U.S., UN, EU and other friendly Western nations that it has decided to stop its attacks in Gaza in order to facilitate a ceasefire.
Israel can include a timetable for scaling down operations to show that it is willing to abide by this step, and that it is receptive to allied nations and international institutions.
Any announcement of a ceasefire on the part of Israel must include a clear message that if Hamas, PIJ or any other terror group continues firing after the truce begins, the IDF will retaliate with full force. This includes the launching of incendiary balloons or exchanges of fire along the Gaza border fence.
Even if they do not adhere to the ceasefire, the Gaza terror groups will surely be brought in line if they are attacked. It is important to make sure that Hamas and PIJ are not allowed - via mediators or any other means - to deliver terms to Israel before they cease firing rockets.
Most importantly, they must not be allowed to make demands regarding Jerusalem, the West Bank or Israeli Arabs.
It is crucial to remember that Hamas' main achievement from this round of fighting is its ability to align itself with the Palestinians in the West Bank and Jerusalem, as well as Israeli Arabs. It will try to use these gains to make demands for a ceasefire.
This should be prevented with no compromise and Hamas cannot be allowed to fire the last shot. The IDF must pummel them until they cease fire and understand the price Israel will make them pay is far greater than any ideological or psychological benefits from continuing the rocket fire.
2: Humanitarian aid and returning Israeli captives
When Israel is assured beyond all shadow of a doubt that a ceasefire really is in effect, it will need to implement a carefully thought out plan to minimize the humanitarian damage in the Gaza Strip, in cooperation with international elements.
It must simultaneously state that the renewal of socioeconomic activity in the enclave is conditioned on preventing Hamas and PIJ from further rearmament and the return of the Israelis held captive by them, under reasonable terms.
If Hamas refuses to this agreement and if it is unable to get the other terror groups to agree, the Strip will remain under blockade, receiving only basic aid from international bodies.
This means no Qatari money and no infrastructure projects.
At the same time, the IDF must continue to thwart any attempts to rebuild the terror groups' tunnel network and military R&D apparatus.
From the first day after the fighting, Israel will have to operate in Gaza the same way it does along its northern frontiers with Syria, Hezbollah and Iran.
The country will not longer wait for Hamas and PIJ to stock up on armaments, but actively thwart any such attempt, including fierce retaliation for any other transgression of Israel's sovereignty such as arson balloons, drones or rockets.
A reasonable deal to return the bodies of fallen IDF soldiers Hadar Goldin and Oron Shaul and captive civilians Avera Mengistu and Hisham Al-Sayed would include the exchange of Hamas activists arrested during the latest round of fighting and also some who were arrested during the 2014 Gaza war.
Israel will also release women and sick or disabled prisoners, but never convicted terrorists such as Hamas leader in Gaza Yahya Sinwar, who was freed in the 2011 swap for Gilad Shalit.
If Hamas does not agree to this, Israel will not permit full economic and social rehabilitation of the Strip.
3: Negotiating with Abbas to block Hamas
If step 2 is achieved to a reasonable degree, Israel must tell Palestinian President Mahmoud Abbas that from now on it will only talk with him on all future infrastructure and civilian plans for the Gaza Strip, thereby ensuring that any money allocated to them will not be used by the terror groups.
Also, when the time is right, Israel will need to enter talks with the Palestinian Authority in order to reach some intermediary settlement.
This agreement would be designed to prevent Hamas from capitalizing on what it has achieved since the start of the events that led to the fighting and block it from gaining a leadership role for the Palestinian people.
Israel must also harness Egypt and Jordan to regulate the status quo in Jerusalem and the Temple Mount in a way that will prevent radical Islamic elements from using it to fuel further religious and nationalistic confrontations.
But in order to accomplish all of this and escape this never-ending cycle of fighting, Israel needs a functioning and pragmatic government.
It needs a government interested in achieving deterrence and finding viable solution to the Gaza problem, which will serve as a model and lay the groundwork for ethe Israeli-Palestinian conflict.