Cairo, Egypt - The Muslim Brotherhood's rise to power in Egypt strengthened the hand of Hamas, but the downfall of president Mohamad Morsi may now spell disaster for the Islamist group ruling the neighbouring Gaza Strip.

A year ago in Cairo's Tahrir Square, thousands gathered to celebrate Morsi's election, chanting: "In millions weshall march to Jerusalem." Today, the same square is overflowing with opponents who supported his ouster by the army, with some blaming Hamas - the Palestinian chapter of the Muslim Brotherhood - for Morsi's political missteps.

"During Morsi's one-year rule, Hamas bore the blame for many of his blunders and had attained massive losses in the Egyptian public opinion,” said Mohamed Goma'a, a Palestinian affairs expert at the Al-Ahram Center for Political and Strategic Studies.

In the weeks before Egypt's military coup, severe fuel shortages and frequent electricity blackouts across the country added to the nationwide agitation. Snaking queues of motorists waited for days at petrol stations to fill their tanks, paralysing traffic.

Some Egyptians said heavily subsidised fuel was being smuggled out of Egypt through the vast tunnel network to Gaza amid Israel's crippling blockade, imposed after Hamas took power in 2007.

Inside Story - Is Egypt on the brink of further divide?

The Morsi government's approach to Hamas was warmer than that of the former regime of Hosni Mubarak, which tooka much stricter approach towards the Rafah border crossing connecting Egypt with Gaza. This, coupled with the blockade, forced Gazans to establish a complex network of tunnels that now serves as the territory's economic lifeline. An estimated 30 percent of goods that reach Gaza's 1.7 million Palestinians come through the tunnels.

Yet Goma'a believes Hamas' gains fromMorsi's rule fell far short of expectations. "Hamas had repeatedly demanded that the Rafah border crossing be opened for trade and not only individuals, and that an Egyptian-Palestinian free trade zone be established. But they got neither," he said.

Tensions between Morsi's government and Hamas escalated following the shooting of 16 Egyptian soldiers in August 2012 by unidentified gunmen, who reportedly entered the country through the tunnels. Egypt began destroying many tunnels after that, even flooding some with raw sewage.

But according to Oliver McTernan, director and founder of the UK-based group Forward Thinking, both Morsi's government and Hamas were "very careful not to compromise the other”.

"The link between Hamas and the Brotherhood has been exaggerated for political reasons, a way of undermining the Brotherhood," McTernan said.

Since the 2011 revolt that toppled Mubarak, Hamas has been repeatedly accused by Morsi's critics of interfering in the country's affairs and meddling with its security. An Egyptian court found on June 23 that Morsi escaped from prison during the 2011 uprising with help from Hamas.

"There are a number of loopholes in Egypt's security and the army is quite concerned," said Gamal Sultan, professor of political science at the American University of Cairo. "Demolishing thetunnels will be a priority for the new government. Once the opportunity arises,Egypt will be sterner with this portfolio."

The tunnels provide Gazans with building material, livestock, medicine, clothing and most importantly fuel, and are also a vital source of income for Hamas. But they're also used as a pathway for weapons heading in both directions.

Trouble in Sinai

For the last two years, with Egypt's army increasingly involved in the country's political scene, unidentified gunmen in the western Sinai peninsula have launched several assaults, usually targeting soldiers. In 2011, a pipelinesupplying Israel and Jordan with gas was attacked 15 times, and in May 2013 seven Egyptian soldiers were kidnapped.

Violence on the peninsula is expected to rise following Morsi's downfall, and senior Muslim Brotherhood member Mohamed el-Beltagy said the situation will not calm down until Morsi's rule is restored.

If Egypt were to destroy the tunnels, Goma'a said, it risks "Gazans exploding into Egypt's Rafah like in 2008". In January 2008, as many as half of the people living in Gaza rushed across the border after members of Hamas destroyed part of the border wall.

Goma'a also said the tunnels can be a "pressure card" in the hands of Egypt's new regime against Hamas, to persuade it to seek reconciliation with Fatah, which controls the West Bank.

The Islamist group has not said much since Morsi's expulsion by the Egyptian army. Gaza's Prime Minister Ismail Haniyeh, in a sermon last Friday, avoided addressing the matter directly, saying: "We expect the Arab Spring cycle to continue until its objectives are attained, including our own cause."

However, Sultan said Hamas' leadership is obviously concerned with Morsi's overthrow and the loss of a Muslim Brotherhood ally across the border.

He also ruled out any notion that the political upheaval in Egypt could inspire a similar takeover in Gaza, noting the territory has different political instiitutions and the absence of "an autonomous army”.

"Hamas will have to tighten its security grip … They do not need to escalate matters at the time being. Hamas may even resort to sparking a third intifada as a distraction away from the mounting pressure it would face.”