GAZA CITY // A lasting truce between Hamas and Israel hinges in part on the network of smaller armed Islamist groups in Gaza, say analysts.
Tensions have been rising in recent years, with the miltant groups accusing Hamas, the territory's rulers, of abandoning the fight against Israel in favour of upholding a shaky truce agreed after the three-week Israeli war on the enclave four years ago.
Hamas leaders have consolidated their control over Gaza since then and rarely fired rockets into Israel. For the most part, they also restrained others from doing so.
But since Hamas fired hundreds of rockets in response to Israel's assassination of its top military commander last week, criticism from other militant groups in Gaza has softened - at least for now.
"It may take some time, but these tensions are bound to surface again," said Talal Okal, who lives in Gaza and is an independent analyst and expert on Hamas. "And this could mean just another cycle of violence like we've just experienced."
Hamas seized control of Gaza five years ago in a battle with the Palestinian faction Fatah and wants to strengthen its hold here.
It has received backing from other Islamists, including fellow Muslim Brotherhood outfits whose influence has grown in the region over the past two years.
Grating against this, however, are groups such as Islamic Jihad, Gaza's second-most powerful militant group, and smaller outfits of Salafist fighters who espouse views far more radical than Hamas.
Salafist fighters have become a nuisance to Hamas, coordinating attacks against Israel and in Egypt's Sinai area on their own.
A member of Hamas's armed wing, the Al Qassam Brigades, said the group had to work especially hard to restrain Salafis from firing mortars and rockets at Israel. Before the recent fighting, he said that Hamas had increased its efforts to restrain one such Salafist group in particular, the Jaljalat. It consists of disgruntled Hamas members who defected because they believed the group had abandoned armed resistance against Israel.
"If there is a ceasefire, we will do our utmost to stop these groups, even if that means using force," said the Al Qassam member, who lives in the southern Gaza Strip city of Khan Younis.
Islamic Jihad members have said they would back a truce with Israel. "We stand united with Hamas," said a fighter from Islamic Jihad's militant wing, the Al Quds Brigades.
But philosophical differences and foreign sponsors with competing agendas could again put Hamas at odds with Islamic Jihad and other armed groups.
Members of Islamic Jihad, which maintains close ties with Iran, see Hamas's attention to governing Gaza as a distraction from the primary goal of fighting the Israelis.
In an interview with The National in June, Ahmed Al Modallal, a senior Islamic Jihad official, said: "So long as Hamas leaders say they are a resistance movement that does not recognise Israel, we stand beside Hamas."
But enforcing a ceasefire could again weaken Hamas's resistance credentials, especially if it is seen as restraining retaliation against Israel's air strikes on Gaza.
Until now, Hamas has dealt with the pressure by temporarily not objecting to other groups firing rockets into Israel. Now it has to find a balance between upholding a truce and avoiding accusations of being Israel's border police, said Nathan Thrall, a Jerusalem-based analyst for the International Crisis Group.
"Hamas is not only dealing with these Salafis - some of whom were former Hamas members — but also their own people and their own militants who are saying, 'What's going on here? We're giving up on resistance without ending [Israel's] occupation?'" said Mr Thrall.
A durable ceasefire would only take hold in the event of an deal that yielded substantial benefits to Palestinians - which could include efforts to roll back Israel's occupation of the Palestinian Territories.
Mkhaimar Abusada, a professor of political science at Gaza's Al Azhar University, said Egypt's role could be crucial if it answers the call by Hamas to open its border with Gaza for trade. That would allow Hamas to destroy the tunnel networks through which foreign weapons are sent to Gaza.
Hamas would thus be put in total control of its incoming trade.
This could confer "legitimacy" on Hamas and anger the United States, European Union and Israel, which classify the group as a terrorist organisation. "But it would allow Hamas to more easily operate as a government and an effective police force," said Mr Abusada.