In mid-March Khaled Meshaal, the Damascus-based leader of Hamas, spoke to Bashar Al Assad to express his concern about the Syrian regime's crackdown on popular protests spreading across the country. Mr Meshaal had been asked to do so by key supporters at a private meeting at his home in the Syrian capital a few days earlier.
Mr Al Assad's response was characteristically blunt: you are either with us or against us. He demanded that Hamas mobilise its followers inside Syria, in occupied Palestine and throughout the region in support of the regime. Mr Meshaal responded by telling the president that Hamas was grateful for the regime's support but that it also stood with the people, and wished to maintain its distance between the two.
While the regime was outraged, Mr Meshaal made clear that if the regime insisted with its demands, he and his entourage would leave Syria. Faced with the prospect of losing one of his best assets, Mr Al Assad relented, and the Hamas leadership, after much deliberation, decided to maintain its headquarters in Damascus, albeit with a reduced number of staff. Since then, an uneasy calm has existed between the two.
However, the uprising in Syria has shaken the foundations of the relationship. The announcement last week that Hamas had opened an interests office in Cairo, hot on the heels of the Hamas-Israel prisoner deal, in which Egyptian security officials played a crucial role, suggests that the movement has begun to consider options outside of Damascus.
As the growing influence of Egypt demonstrates, Hamas-Syrian relations are increasingly being shaped by other actors. Under the weight of a range of regional pressures, and given the new narrative of the Arab Awakenings, Hamas has found it difficult to chart an independent political course over the past few months.
It was no coincidence therefore that Turkey and Qatar took nearly two-thirds of the 42 Palestinian prisoners exiled abroad in the Shalit prisoner swap deal. Both countries have emerged as independently minded regional powers that balance relations with Islamists, particularly the Muslim Brotherhood, and the United States. Having established closer relations with Hamas in the wake of its forced take-over of the Gaza strip in 2007, both are now in a position to influence the group.
Turkey in particular has provided technical assistance and institutional know-how to the Hamas government in Gaza, in many cases training a new cadre of technocrats. Arguably, such engagement has had a "civilising effect", focusing the movement towards governance rather than its mantra of "armed resistance". In Gaza at least, the majority of its security efforts are now focused on controlling and halting rocket fire from other extremist groups.
The upheaval in Syria and throughout the region has also left Hamas in a precarious financial situation. According to Gaza-based economists, the Hamas government's main source of funding - Iran, which provides about two thirds of the government's total monthly budget of about $20 million (Dh73 million) - has dried up over the past three months. The Iranians are deeply unhappy that Hamas has not led the Palestinian street in defence of the actions of the Assad regime. The group's other flows of funding, namely non-governmental organisations (most of them Gulf-based) and the Muslim Brotherhood International, have also slowed as these donors face competing demands from Islamist parties eager to compete in the region's new political environment.
Reliant on outside donations for 90 per cent of its total revenues, Hamas is having to look elsewhere to plug its immediate budgetary demands - which include meeting the costs of governing Gaza, funding the movement at large and maintaining its security wing. Its government has had to raise fuel and other commodity taxes and is also set to unveil a new tax scheme, making Gazans increasingly nervous and damaging the movement's popularity. Although revenues from the tunnel economy have slowed following the partial lifting of Israel's siege, it continues to provide an estimated $500,000 daily in fuel, cigarette and even car taxes to Hamas, giving weight to the argument for lifting Gaza's isolation entirely.
Adding to Hamas's predicament, President Mahmoud Abbas is riding a wave of popular support following his successful trip to the United Nations and quest for membership. This, in large part, explains why Hamas threw in its best card, Gilad Shalit, without obtaining the release of some of the longest-serving Hamas prisoners, including Ibrahim Hamed and Abbas Al Sayyid, two of its top military commanders. Nevertheless, the timing was crucial - Hamas clearly felt the need to reassert itself, and the group has enjoyed a popularity boost as a result. Ultimately, the celebrations and the rhetoric of "more Shalits'" may have been a fundraising exercise to attract attention to Hamas's cause.
Hamas's base in Damascus and reliance on Iranian support are both in jeopardy, leaving the group in an uncomfortable predicament. It is, however, a predicament which they should be encouraged to turn into a positive political route. The developments in Syria may ultimately force Hamas to take a more pragmatic, politically flexible path. The reconciliation deal between Hamas and Fatah, given new impetus by recent events, is the clearest sign of this new direction, forged under the pressure of regional developments.
It seems as if both Israel and the United States long ago lost faith in any internal evolution of the movement. This is a mistake. Now is the time to work with the regional partners who have influence over the group to encourage Hamas and Fatah to unite under a unified Palestinian government of state-builders. In this regard, it is also time to lift the partial siege of Gaza and restore access and movement for its long-suffering citizens. Given the changes sweeping the region, it is both a political and moral imperative.
Salman Shaikh is the director of the Brookings Doha Center and former special assistant to the UN Special Coordinator for the Middle East Peace Process