Hamas' long-standing political leader Khaled Meshal was in trouble the moment Western sanctions - punishment for Iran's illicit nuclear activities - began eating into Tehran's funding for its longtime Palestinian proxy. Meshal's job, after all, was to manage the lucrative Iran-Syria-Hamas axis. Then Bashar Assad began mowing down Sunnis in Syria, making it impossible for Hamas to remain there without appearing complicit. When the group pulled its headquarters out of Damascus in February, there was no denying it: Meshal was toast.
In January, a Hamas statement suggested Meshal's tenure was ending. But in April, the London-based newspaper Asharq Alawsat issued a conflicting report: Meshal, based in Doha, was managing relations with Hamas benefactors in Qatar, who began pouring funds into Gaza for construction projects. The confusion was unusual for Hamas, which has over the years earned a reputation for maintaining message discipline.
In all fairness, Hamas may not have known how to handle Meshal. With their political and economic future in flux - owing to instability brought on by the regional rise of the Muslim Brotherhood and a falling out with Iran - Hamas' leaders may still not know whether he is an asset or a liability.
Last month, however, reports of Meshal's demise began to circulate again. Reuters reported he was "tired of policy challenges from the Islamist group's Gaza-based leadership and is not seeking re-election." The Associated Press confirmed this report with two Hamas officials. Meanwhile, Iran and Syria heaped scorn on Meshal, calling him a Zionist, for good measure.
Meshal's likely replacement will be Mousa Abu Marzouk, who also left Damascus but moved to Cairo, where he now manages relations with the Muslim Brotherhood government of Mohammed Morsi. While Marzouk's appointment is still unconfirmed, it would be a logical one. Hamas was born of the Brotherhood and is keen to develop political and economic relations that would help reintegrate it with other Islamist regional governments.
Marzouk's job, if he lands it, will almost certainly not resemble Meshal's post in Damascus, however. Hamas is in the midst of a massive reshuffle. While it was once divided between two geographic headquarters in Gaza and Damascus, as veteran Palestinian watcher Ehud Yaari notes, Hamas' "center of gravity has now shifted back to the Gaza leadership, which is capable of developing its own network of foreign support."
Hamas, in other words, has become more centralized. Whether this is the result of politics or ideology is still unclear. Either way, the Gaza-based government under Ismail Haniyeh appears poised to run the show, while other high-level figures manage important regional relationships.
If that sounds like a diplomatic corps, it should. This is where the movement appears to be headed. Hamas recently announced it is training diplomats to represent the Gaza government's interests abroad.
In short, after losing Iran's largesse and parting ways with Syria, Hamas began to cultivate new Sunni patrons and dispatched senior figures to manage those relationships. Today, Hamas is courting three regional powers strongly associated with the Muslim Brotherhood: Egypt, Turkey and Qatar. While these countries are traditionally competitors for regional power, Hamas has so far managed things rather well. Its leadership appears even to have established a division of labor: Qatar takes the lead on construction projects in Gaza, Turkey sells a wide range of consumer products there, and Egypt tentatively - perhaps glacially - works to bring Hamas out of isolation.
At the same time, Hamas continues to court the Iranians, even though funding has dried up. That's because Iran can still play the spoiler by funding other Gaza-based terrorist groups that can attack Israel, including Palestinian Islamic Jihad and the Popular Resistance Committees. Hamas' leaders know they'll pay a price if the mullahs unleash a proxy attack on Israel, eliciting retaliations that could compromise the group's ability to rule Gaza. Iran could also direct attacks against Egyptian interests in the Sinai, jeopardizing the nascent Egypt-Hamas ties Haniyeh so desperately wishes to cultivate.
In early September, Hamas cofounder Mahmoud al-Zahar met with several senior Iranians in Tehran. He also made sure to drop in on Iran's Lebanese proxy, Hezbollah - ostensibly for the same reasons. As Zahar admitted, "nobody can ignore Iran's significance and important place in the Palestinian issue."
Hamas' leaders did not seek a falling-out with Iran, but new realities have forced them to adapt. They've muddled through, maintaining control over Gaza, while working to integrate its government into the new politics of the region.
Meshal has not fared as well. The longtime Hamas figurehead now faces unprecedented challenges, including new allegations that he embezzled $12 million from the movement. As his political opponents sharpen their knives, it's no surprise he recently skipped a trip to Gaza.
Meshal's fate may not be sealed, however. While regional changes have forced Hamas to evolve, its violent, rejectionist ideology has not wavered. As its principal articulator, Meshal was an effective spokesman. Hamas may find use for him yet.
Jonathan Schanzer is vice president for research at the Foundation for Defense of Democracies and author of "Hamas vs. Fatah: The Struggle for Palestine" (Palgrave Macmillan, 2008 ). He tweets at @JSchanzer.