By Nidal al-Mughrabi
GAZA (Reuters) - It's not quite a case of the enemy of my enemy is my friend, but shared concern over Islamic State-inspired militant groups in Gaza could help redraw complex relationships between Hamas and a hostile Egypt and Israel.
Talk is rampant in the territory of 1.8 million of a prospective pullback from confrontation with Israel - a long-term ceasefire to cement further an Egyptian-brokered truce that brought an end to the Gaza war nearly a year ago.
That could allow Hamas to step up efforts to rein in radical Islamists, known as Salafis, who have claimed responsibility for recent rocket attacks against Israel, and open the way for more reconstruction aid to reach Gaza.
There are also signs of change along Egypt's frontier with the Gaza Strip.
The military-run government in Cairo, which accuses Islamist Hamas of backing jihadi fighters in Egypt's Sinai desert, opened its border with Gaza this week for the first time in three months, permitting Palestinians to travel in both directions.
"The new easing of measures results from the presence of a common enemy," said Akram Attallah, a Gaza-based political commentator.
Hamas insists Islamic State has no foothold in Gaza, where the Palestinian group's forces are dominant. It has described what Salafi groups say have been the arrests of dozens of their supporters as no more than action against "criminal elements".
But by mounting such operations, some in the wake of Salafi-claimed rocket strikes, Hamas has also shown a commitment to a truce with Israel and demonstrated to Egypt that it is fighting the same jihadi enemy, Atallah said.
Over the past few months, envoys from Europe and the United Nations, as well as the Qatari ambassador overseeing the Gulf state's Gaza reconstruction projects, have visited more often, strengthening the belief a new truce channel is active.
Some analysts have raised the prospect of a five-year ceasefire deal that would address Hamas's call for the opening of a Gaza seaport and an end to Israel's naval blockade, a measure Israeli officials say is aimed at blocking weapons from reaching the group.
"It is not the first time that Hamas is sending the message that it would like to discuss a Hudna (long-term truce) with Israel," said Haim Tomer, former head of overseas operations at Israel's Mossad intelligence agency.
"(Hamas) is a movement that has become a regime and when you are a regime you can suffer as a result of your grip on power. This is what they are now learning. So they are looking for options," he said.
CEASEFIRE TALKS
An Israeli official, discussing the sensitive issue on condition that he not be identified, said he was aware of talks conducted by Qatari and Egyptian officials about a possible five-year ceasefire, but no agreement was imminent.
"The difficulty right now is in getting a commitment that there won't be any (Palestinian) shooting whatsoever. The demands of Israel are mainly to do with easing the blockade and (restrictions at) border crossings," the official said.
Another Israeli official, however, said that talks being held with Qatar were focussed mainly on Gaza reconstruction.
Hamas spokesman Sami Abu Zuhri, asked about prospects of an expanded ceasefire with Israel, told Reuters the group had received "ideas" but no concrete proposal.
"We will deal with any effort that would lead to breaking the blockade and alleviate the suffering of Gaza people on condition it does not affect our national cause."
The recent rocket attacks from Gaza caused no casualties in Israel, which responded with retaliatory air strikes that seemed to be aimed at keeping a lid on hostilities by targeting facilities abandoned by Hamas.
In Gaza, where economic recovery and reconstruction have been slow after a conflict in which more than 2,200 Palestinians were killed and tens of thousands of homes damaged, Atallah said Hamas and the enclave's residents did not want renewed fighting.
"Certainly there is a serious worry, especially when some Israeli leaders say it could cause a new war if a rocket hit a populated place or killed someone," said Atallah.