A rapprochement between Hamas and Tehran is under way almost three years after a breach over the Palestinian party's refusal to back the Syrian government in the civil war, and amid its current political isolation following the demise of the Muslim Brotherhood in Egypt.
The rebuilding of the relationship is likely to dismay Israel and the US, which had welcomed the weakened ties between Gaza's rulers and their powerful political, financial and military sponsors.
The alliance was severely damaged by the stance Hamas took when the uprising against Bashar al-Assad began in Syria almost three years ago. Although the exiled Hamas leadership had been hosted by Assad's regime in Damascus for a decade, it refused to back the government against the rebels, incurring the wrath of Syria's allies, Tehran, Meshaal and other members of the external Hamas leadership left Syria the following year, in 2012.
Iranian leaders cut off funding to Hamas, which had been worth around $23m (£14m) a month, causing a serious financial crisis for Gaza's rulers. This has been severely exacerbated in the past six months by the closure of the smuggling tunnels between Gaza and Egypt by the new regime in Cairo.
The removal of former the Egyptian president Mohamed Morsi and the bloody crackdown on the Muslim Brotherhood, Hamas's ideological parent organisation, has left the Palestinian Islamist party politically and psychologically isolated. "Hamas's big dream of political Islam coming to power has vanished," said the Gaza analyst Omar Shaban.