RAMALLAH // The startling fall of the Muslim Brotherhood in Egypt has threatened to undermine Hamas's capacity for fighting Israel and weakened its grip on Gaza, analysts say.
Leaders in the Palestinian Islamist movement had hoped the rise of the Brotherhood would help to end its international isolation and strengthen support in the region. But after the military removed Egypt's democratically elected president, Mohammed Morsi, and arrested members of the Muslim Brotherhood, such a future looks increasingly uncertain.
"This is a nightmare scenario for Hamas," said Mkhaimar Abusada, professor of political science at Al Azhar University in Gaza. "If you look at the whole region, it's not nearly as friendly to Hamas as it was just a few weeks, even days, ago."
Losing its ally in Egypt has left Hamas short on foreign patronage. Moreover, swelling public anger in Egypt directed at the Muslim Brotherhood, to which Hamas is affiliated, has damaged the group's reputation at home and in the region.
Hamas, which has been silent on the events in Egypt, has seen its foreign relations shift dramatically since the Arab uprisings began in late 2010. Embarrassed by the brutal response to anti-government protesters by the regime of the Syrian president, Bashar Al Assad, once a vital supporter of the group, Hamas dismantled its longtime headquarters in Damascus.
The break with Syria also damaged its ties with another important backer, Iran, which Hamas officials admit has significantly reduced its financial support. Tehran is a key ally of Mr Assad's regime.
But Hamas's external leadership found new Islamist patrons in Egypt and Turkey, as well as aid from Qatar.
Yet backing from Doha - which has stepped in with substantial financial support - looks more uncertain with the accession to the Gulf monarchy's throne last month of Sheikh Tamim bin Hamad Al Thani, said Imad Salamey, professor of political Science at the Lebanese American University in Beirut.
"I don't think Qatar will be able to sustain the level of their support, which will put Hamas further in crisis," he said.
Doha is probably reassessing support for Muslim Brotherhood affiliates across the region, he said, in part because of concern of siding against the popular rage that led to Mr Morsi's ousting. Also influencing that reassessment are relations with its powerful neighbour, Saudi Arabia, which has had a tenuous relationship with the Brotherhood.
"I think you're seeing a situation where Qatar is repositioning itself and closing ranks with Saudi Arabia," Mr Salamey said.
But the more immediate concern for Hamas is Egypt. It regulates the tunnels that have become an economic lifeblood for Gaza because of an Israeli-imposed siege on the territory of 1.7 million people.
Mr Morsi's government lifted some of the restrictions on the movement of people and goods through Gaza that had been vigorously enforced - with US and Israeli backing - by Egypt's previously deposed president, Hosni Mubarak.
Egypt's Islamist leadership also gave refuge to senior Hamas officials. Moreover, it facilitated the travel of numerous foreign delegations into Gaza to meet Hamas, which is designated a terrorist organisation by the United States and European Union. The group perceived these visits as support for lifting it out of international isolation.
But Gamal Abdel Gawad Soltan, professor of political science at the American University in Cairo, said anti-Hamas sentiment was running high among anti-Brotherhood Egyptians. That threatens a hardening of Cairo's policy towards Gaza, he said.
Many Egyptians blame Hamas for rising instability in the Sinai Peninsula, near the border with Gaza, including the killing of 16 Egyptian soldiers in the area by militants in August.
Yesterday, Egypt's military closed the country's only crossing into Gaza, Rafah, until further notice, after an Egyptian soldier was killed by militants.
Rumours also abound that Hamas militants are operating in Egypt, bolstering the Brotherhood's security.
Hamas denies those claims, but Mr Soltan said the damage to its image has been done.
"Egyptians long had sympathy for Gaza because of the siege, but perceptions of this security threat emanating from Gaza is new and it won't work in favour of Hamas," Mr Soltan said.
Marwan Shehadeh, an independent analyst who lives in Amman, Jordan, said such sentiment would hinder Hamas's ability to fight Israel. Egypt's new leadership, focused on domestic issues, would not want another war between Gaza and Israel. Because of this, he said, they would probably be more willing to restrict the flow of weapons through Gaza's tunnels, which Hamas and other militants rely on to arm themselves.
"I don't believe Hamas will have enough external support to sustain a new military campaign against Israel," he said. Egypt's military, moreover, may now be more sensitive to losing its annual Dh4.77 billion in US aid that hinges, in part, on the country's peace treaty with Israel, Mr Shehadeh said.
Restrictions on Hamas's ability to fight could anger its domestic support base, which sees an armed response to Israel as integral to the movement. It may also put greater public pressure on the group to pursue its stalled reconciliation deal with the Fatah faction, which controls Palestinian areas in the West Bank, said Hani Masri, an independent analyst who lives in Ramallah.
Hamas wrested control of Gaza from Fatah forces in 2007. Their reconciliation deal - widely supported by Palestinians - calls for reuniting the territory with the West Bank through national elections.
Critics accuse Hamas of stalling on the reconciliation deal because, in part, of reluctance to relinquish control over the lucrative businesses it operates in Gaza.
"Hamas needs to have distance from the Muslim Brothers, and it needs to portray itself as a nationalist Palestinian movement," Mr Masri said. "If Hamas does not do this, I think it will be weakened, or it could even collapse."
Some see Mr Morsi's ousting as possibly strengthening the resolve of not only hardliners in Egypt's Brotherhood, but also those in Hamas, against democratic rule. The latter swept Palestinian parliamentary elections in 2006, only to see Fatah, Israel and the international community undermine that victory.
"The perception now among Islamists? Democracy is fine so long as the Brotherhood doesn't win at the ballot box," said Jonathan Schanzer, vice president of research at the Foundation of Defense of Democracies, a think tank in Washington.