JERUSALEM // The deal between Hamas and Israel for the release of 1,027 Palestinian detainees and one captured Israeli soldier is the most dramatic but not the only sign of cooperation between the two enemies.
Hamas has virtually halted rocket fire at Israel from the Gaza Strip and Israel is spending millions of dollars to expand a commercial crossing into the territory while it loosens its blockade of the coastal enclave and its 1.5 million residents.
Israel and Hamas recognise that their ceasefire and commercial cooperation are mutually beneficial in buying time and bolstering flagging support at home, analysts say. In particular, Israel's prime minister, Benjamin Netanyahu, is struggling with protests against his government's economic policies and with fraying ties with two of its key regional allies, Egypt and Turkey.
There is "an unwritten agreement for maintaining a full truce between Gaza and Israel that is managed by Hamas's leadership in Gaza," said Mahdi Abdul Hadi, a Palestinian political analyst and founder of Palestinian Academic Society for the Study of International Affairs, in Jerusalem.
Israel views Hamas as useful in preventing rocket attacks against southern Israeli towns that border the strip, and has never enjoyed such extended lulls before, Mr Abdul Hadi said.
Despite the uneasy detente, Israel's leaders are loath to publicly praise the movement, which in the past carried out a campaign of suicide attacks on Israeli cafes and buses.
Both sides also know that their ties, built on convenience and mutual benefit, could deteriorate overnight.
Hani Masri, a Palestinian political analyst in Ramallah, pointed out that a crisis similar to Israel's invasion of Gaza in December 2008 could easily happen again.
For the time being, he said, the interests of both sides mesh, leading to the compromises that both made for the release of Palestinian detainees and Gilad Shalit, who was captured by militants on the Gaza border in 2006.
Hamas backed down from its initial demand that Israel release a number of high-profile Palestinian prisoners, including the Fatah leader Marwan Barghouti, in exchange for Mr Shalit.
For its part, Israel agreed as part of the deal to free 279 Palestinians serving life sentences.
Mr Masri said the compromises were part of a deliberate calculation by both sides to undercut the recent boost of Palestinian popular support for Mahmoud Abbas after the Palestinian Authority president's bid for statehood at the United Nations. Both Israel and Hamas opposed the initiative.
"Hamas is more flexible because its situation is more complicated after the achievement of Abu Mazen in the United Nations," he said.
Talal Okal, a political analyst in Gaza, said Hamas's precarious situation in Syria, where the group maintains its headquarters, was a reason for it not to antagonise Israel.
The group's fear that it may be expelled by the government of Bashar Al Assad has forced it to adopt a more cautious approach.
He said he believes Israel also has a stake in not damaging Hamas's control over Gaza, particularly since the group struck a reconciliation accord with Mr Abbas's rival Fatah faction in May. Mr Netanyahu opposes this deal.
"From the Israeli side, the prisoner exchange deal shows that Israel is giving Hamas a chance to re-balance the power between itself and Fatah," he said.
At the same time, "everyone knows that Hamas is securing Israel's border. Israel knows that. The Arabs know that. The Americans know that," Mr Okal said.
This could actually backfire in terms of popularity among Palestinians, he said.
"Gazans all know this is a show. They see the contradiction by what is said by Hamas about Israel and what they do on the ground."