Gaza City, Palestinian Territories: Posters of Egyptian President Abdel Fattah al-Sisi beam out over a site in the war-battered Gaza Strip where laborers and bulldozers are hard at work rebuilding.

After years of retreat, Egypt is making its presence felt again in the neighboring Palestinian enclave, emerging as a key benefactor in the aftermath of the last bout of fighting between Hamas and Israel in May.

In the weeks following the deadly violence, a number of Egyptian workers crossed the border on a mission to lay down a coastal road in the Gaza's northern city of Beit Lahya.

"The president's instructions are to reconstruct the Gaza Strip. We are about 70 engineers, civil servants, lorry drivers, mechanics and workers," said a worker who preferred not to give his name.

He added that he was "happy to help Palestine".

During the 11-day conflict that erupted between Israel and armed Islamist factions in Gaza last May — the worst since 2014 — Egypt worked behind the scenes to mediate a ceasefire.

Cairo also pledged a $500 million package to reconstruct the enclave which borders Israel and Egypt.

'Common interests'

Relations between Cairo and Hamas — an offshoot of Egypt's veteran Islamist opposition Muslim Brotherhood group — have been sour, particularly after the 2013 military ouster of late president Mohamed Morsi, also of the Brotherhood.

The sight of Egyptian workers rebuilding Gaza as Egypt invests millions in the enclave was "unexpected, unimaginable", Palestinian economist Omar Shaban said.

"Egypt and Hamas are not friends, but they have common interests," he explained in his office in Al-Rimal, a Gaza district that was heavily bombarded by Israel in May.

"Egypt wants to maintain the ceasefire by engaging in the after-war reconstruction efforts."

Hamas is in desperate need of international aid for reconstruction, while positive relations with Egypt are an added benefit as it controls the Rafah border, often the only access point for much-needed construction material to the enclave.

Egypt, meanwhile, "understands that it doesn't have a lot of options" in Gaza, where Hamas — nearly 15 years after seizing power from the Fatah movement and despite four wars with Israel — still holds firm, Shaban said.

Qatar vs Egypt?

Over recent years, Qatar has become the prime donor of aid for the impoverished territory, but in the aftermath of the May fighting, the flow of cash came to a halt.

The energy-rich Gulf country — considered to be sympathetic to the Muslim Brotherhood and its offshoots — has dispensed tens of millions of dollars in aid to poor families in Gaza.

But a dispute arose over the distribution of salaries to Hamas officials as Israel objected to cash payments, suggesting that the Islamist movement could divert the money to its armed faction.