By Wyre Davies
BBC News, Jerusalem
Israel does not want to get drawn into a guerrilla war in Gaza
As much as a hopeless optimist might read too much into the ceasefire agreement between Israel and Hamas, many sceptics regard this as an agreement born from necessity rather than a mutual drive for lasting peace.
Proof of that, perhaps, was the low-key, guarded announcement from Israel that a deal had indeed been done.
The previous day, Egyptian negotiators and Hamas leaders in Gaza had told the world about the agreement, so why the reluctance from the Israelis to admit to what we already knew?
The first answer is obvious.
Israel does not like dealing with Hamas. Israel has always maintained that it would never negotiate with the Palestinian group which has run Gaza for the last year, fired rockets against Israeli towns and still questions the very right of Israel to exist.
So for Ehud Olmert's government to have struck a deal with the enemy - albeit through Egyptian mediation - breaks many taboos and is a bitter pill for many Israelis to swallow.
A prolonged, un-winnable guerrilla war in the narrow streets of Gaza's refugee camps is not something Israel wants to get dragged into
Secondly, Mr Olmert's coalition government is on shaky ground - largely owing to corruption allegations against him.
Many of his critics and some analysts suggest the only reason the beleaguered prime minister is negotiating over Gaza - and at the same time engaging in mediated peace talks with Syria - is to deflect attention and pressure away from his dire domestic situation.
Ultimately - Israel and Hamas need this ceasefire.
The situation in and around Gaza has become an almost intolerable burden for both parties.
Israel's long economic blockade of the Palestinian territory has dramatically worsened an already dire humanitarian situation.
The Israeli blockade has increased Gaza's suffering
Only the most basic of foodstuffs and medical equipment have been allowed into Gaza by Israel, almost no-one is allowed out.
After months of suffering, Hamas has had to admit the blockade is really hurting.
Over the same period, the people who live in Israel's towns and communities, just across the Gaza border, have been suffering too.
Hundreds of crude, but effective, rockets fired by Palestinian militants have landed in towns like Sderot, killing and injuring several Israelis.
As Israel retaliates, launching air strikes against Gaza, hundreds of Palestinian civilians have been killed.
Calls from Sderot residents and political hardliners for Israel to launch an all-out attack on Gaza have, thus far, been noted but not heeded.
There are many obstacles to overcome and both sides have warned that the fragile truce will collapse if it is violated
Israel says that military action is an option it is still preparing for.
Military analysts worry that - under Hamas - militants in Gaza have been able to acquire better and more powerful weapons in recent months - largely because of smuggling through Egypt.
A prolonged, un-winnable guerrilla war in the narrow streets of Gaza's refugee camps is not something Israel wants to get dragged into.
'Doves' and 'hawks'
So what chance the ceasefire - which comes into place on Thursday morning - can hold?
The short answer is that time will tell.
That is not a flippant response because, as time passes, certain factors could strengthen and prolong the deal.
Israel, for example, hopes that Gilad Shalit, a 21-year-old soldier captured by Hamas-backed militants two years ago, may soon be released from captivity in Gaza. That would, clearly, help build trust.
The deal comes as Ehud Olmert faces corruption allegations
For Hamas, the lifting of the economic embargo and the subsequent improvement of daily life might persuade Gaza's leadership that negotiation is the best response - negotiations that could also ultimately result in an end to hostilities in the occupied West Bank.
For the time being all of Gaza's - often disparate - armed groups have agreed to the ceasefire and the arguments of Israeli "doves" are being prevailing over those of the circling "hawks".
There are many obstacles to overcome and both sides have warned that the fragile truce will collapse if it is violated.
As one sceptical Israeli minister said, on acknowledging a ceasefire was imminent: "Even if it happens, it's difficult to know how long it can last."