Damaging knock-on effects of Morsi's downfall for Hamas
Just a year ago, large billboards were erected in the Gaza Strip that reflected the optimism of its Islamist Hamas government about the emerging regional order.
They showed Hamas Prime Minister Ismail Haniyeh smiling broadly while shaking hands with the newly elected Egyptian President Mohammed Morsi, against a backdrop of the pyramids.
In reality, the relationship between President Morsi and Hamas - an ideological offshoot of his Muslim Brotherhood - never turned out to be as rosy as both sides might have hoped.
Recent developments have left the group weakened and isolated”
But now the removal of the Islamist Egyptian leader from office has had a deeply damaging knock-on effect on Hamas and Palestinians in Gaza.
Mr Morsi is facing accusations of collaborating with Hamas to escape from the jail where he was being held during Egypt's 2011 uprising and aiding in attacks on police officers.
The Egyptian media have also accused Hamas of being involved in the shooting of protesters close to the Muslim Brotherhood's headquarters in the Mokattam area of Cairo on 30 June.
In recent weeks Egypt's military has largely closed the Rafah border crossing with the Gaza Strip, restricting the movements of Palestinian travellers.
At the same time it has stepped up its campaign against Islamist militants in the restive Sinai region using bulldozers and dynamite to demolish smuggling tunnels along the Gaza border.
The underground passages mainly operate to transfer cheap fuel and commercial goods into the Palestinian territory from Egypt but they are also used by fighters and to move weapons.Gaza shortages
Ordinary people in Gaza have been the worst affected by the clampdown on the tunnel trade.
On some nights in Gaza City, men sleep by their cars outside filling stations on mattresses awaiting the delivery of petrol from Egypt.
"The number of tunnels was over 1,000. Today only a few hundred remain with the ongoing demolitions," says Abu Ziyad, a Palestinian tunnel operator. "Now the number of workers in the tunnel industry has dropped."
The costs of some staple foods have risen and supplies of building materials have been hit.
"The price of a tonne of cement was 400 shekels. It's gone up to 750 shekels, so it's almost doubled," says a builder, Abed Arahim Safi.
"I've had to freeze most of my projects because customers refuse to pay the high prices. I also laid off some workers."
While Israel has eased restrictions on the Gaza Strip, which were tightened after Hamas came to power in 2007, it is still cheaper to bring some consumer goods from Egypt, particularly petrol, which is subsidised, and some kinds of food.
Israel has only recently allowed small amounts of construction materials to be sent to Gaza for use by the private sector. Many Palestinian firms have continued to rely on Egyptian suppliers.
Hamas, which raises taxes from the tunnels, has seen a large dent in its finances.
Import duties were bringing the faction millions of dollars each year and paid for its 40,000 or so government workers.
"The situation in Gaza does not endure any additional restrictions. We hope that the Egyptians understand the needs of the Palestinian people," senior Hamas official Ghazi Hamad told the BBC.Internal problems
After the Arab Spring brought Islamists into government in Tunisia and Egypt, and prompted Turkey and Qatar to show more active involvement in the region, Hamas hoped to benefit from the geopolitical shift.
This compensated for the loss of its traditional allies in Syria and Iran.
Now recent developments have left the group weakened and isolated.
Hamas leaders have not officially commented on the latest developments in Egypt, saying that they do not interfere in other countries' affairs.
But there are many signs of their edginess.
A week ago, two media offices in Gaza were shut down.
They belonged to the Saudi-owned, pan-Arab broadcaster al-Arabiya and the Palestinian Maan news agency. Both were accused of reporting "fabricated" news by claiming that Muslim Brotherhood leaders had fled to Gaza.
Tensions have also been aggravated between Hamas and its political rival, Fatah, the movement that governs parts of the West Bank.
Hamas accuses Fatah, led by Palestinian President Mahmoud Abbas, of inciting hatred towards it in the Egyptian media. The Palestinian Embassy in Cairo says the documents that it produced to prove its case were false.
Under such circumstances a Palestinian reconciliation deal agreed in May looks unlikely to deliver a new unity government this month as promised.