As the Arab Spring saw the demise of many of the region's autocrats and an emboldening of the Muslim Brotherhood, it was only natural for Hamas to change its alignment.
Hamas redefines itself after leaving Syria for new allies
This month, Hamas's political leader Khaled Meshaal took part in a conference hosted by Turkey's ruling AKP party. A commentator on Syria's state-run Al Dunya television channel compared Mr Meshaal to "an orphan" looking for shelter after being rebuffed by other countries, further admonishing the group's leader for his seeming ingratitude to Syria.
The commentary displayed just how frayed relations have become between Mr Meshaal and the state that granted him sanctuary after Jordan expelled him in 1999. Syria had long provided Hamas with a safe haven in addition to economic and logistical support. Despite the stark differences between the Baathists' secular mandate and Hamas's religiosity, the two parties found common ground in their opposition to Israel.
In February, after months of standing on the sidelines of the uprisings gripping the Middle East, Hamas was forced to make a defining decision. The party declared it was closing up shop in Damascus, signalling a tectonic shift between Hamas and its Syrian hosts.
The implications of this shift for Hamas's relationship with its other traditional patrons in Iran is open to question. Speaking to the Egyptian daily Al Masry Al Youm, Mousa Abu Marzouk, the deputy chief of Hamas's political bureau, acknowledged a change in relations with Tehran as a consequence of events in Syria, but still took a distinctly diplomatic tack on related questions. Mr Meshaal and Khaled Ghadoumi, the chief of Hamas's political bureau in Iran, recently affirmed the strategic relationship.
Most of Hamas's political leadership has moved to Egypt, however, following the rise of the Muslim Brotherhood to the upper echelons of Cairo's political establishment. Mr Meshaal has also strengthened ties with Doha, which through its Al Jazeera media and diplomatic channels has strongly supported Syrian rebels.
As the so-called "Arab Spring" saw the demise of many of the region's autocrats and an emboldening of the Muslim Brotherhood, it was only natural for Hamas - which was started as an offshoot of the Brotherhood - to change its alignment. This pivot brought Hamas back into the fold of Sunni-led states and their oil money.
Qatar has exploited this window of opportunity and asserted itself as a powerbroker (although Doha plays down this new role). The country has thrust itself into many of the upheavals throughout the region over the past year and a half, from Libya to Egypt and now to Syria.
In Gaza, Doha is pouring hundreds of millions of dollars into development projects, helping to rebuild the dilapidated coastal enclave still crippled by Israel's 2008-2009 onslaught and continuing blockade. For the first time since Hamas won the 2007 elections, and the subsequent Battle of Gaza when it wrested complete control of the Strip from Fatah, an official Qatari representative's office has been opened there.
The office oversees a substantial portfolio of aid programmes, including Sheikh Hamad City, a housing project costing about $500 million (Dh1.8 billion), named after Qatar's Emir, Sheikh Hamad Al Thani. This week, Gaza TV reported that Sheikh Hamad would visit the Strip, although Doha has not confirmed the trip.
As Hamas reorientates away from Damascus, there have been apparent fissures in its top ranks. Mr Meshaal has said he would step down as party chief, although the list of candidates in upcoming party elections is still unclear. Traditionally the group has been led by members in exile (partly because of security considerations), so Prime Minister Ismail Haniyeh in Gaza will probably not be chosen.
Mr Abu Marzouk, a long-time political bureau member and Mr Meshaal's deputy, is considered a possibility. He is now living in an upscale suburb of Cairo, and maintains more cordial relations with the Gaza leadership than does Mr Meshaal. He is not believed to be Mr Meshaal's first choice as a successor. Some sources say that is Saleh Al Arouri, Hamas's head of West Bank political affairs who is seen as the engineer of the prisoner exchange with Israel last year.
Mr Meshaal's departure from a leading role, held since 1996, is widely seen as a loss for the group, given his experience and relationships in the region. Many believe his decision was spurred by disagreements between the leadership in exile (which Mr Meshaal represents) and the Gaza-based leadership.
A move this month may indicate Mr Meshaal's future in the movement - transitioning away from operations and towards a more consultative role. At the last minute, he was added to the programme of a conference in Doha on political Islam and democratic governance.
During his lecture on Hamas's experiences in "administering governance under complicated circumstances", Mr Meshaal talked about the challenges of his organisation's dual role of resistance and governance. He reiterated that resistance came first, saying the end goal was national liberation.
The "complicated circumstances" include the chasm between Hamas and the West Bank-based Palestinian Authority, with which he has recently engaged. He even praised President Mahmoud Abbas's speech at the United Nations last year. This has led some in Gaza, especially the more conservative arm of the group led by Foreign Minister Mahmoud Al Zahar, to criticise Mr Meshaal for a perceived deviation from Hamas's political views and a far too conciliatory approach.
These internal dynamics, as well as tumultuous regional changes, have resulted in a shift of allegiances once believed to be ironclad. Hamas, like many of its contemporaries, has struggled to find its footing, shedding old patrons and embracing new ones.
Whether a member of the old guard or the group's new generation replaces the veteran Mr Meshaal, Hamas is beginning a new chapter that may redefine the movement.
Dalia Hatuqa is a journalist and TV producer based in the West Bank
On Twitter: @DaliaHatuqa