After Hamas signed onto an Egypt-brokered ceasefire with Israel last week, Khaled Meshaal, the organisation's leader in exile, had a message that would have seemed impossible a year ago.
He thanked Iran for its role in arming the Sunni-Islamist group that rules Gaza and he called on Arab Gulf states to provide arms in the future.
The statement laid bare Hamas's fluid regional position. After breaking with the Syrian regime over its brutal crackdown, vacating offices in Damascus and clashing with Iran over continued support for the president, Bashar Al Assad, Hamas has moved tentatively away from the so-called "Axis of Resistance" toward the patronage of Sunni Arab states such as Egypt, Turkey and Qatar.
Missing from the stage so far has been Saudi Arabia, whose support or cold shoulder could have a decisive impact on Hamas's political role.
For the last decade, Riyadh has preferred to support the secular and US-backed Palestinian Authority (PA) in the West Bank. Now, analysts say that Hamas's rising profile - and the possibility that it could move away from the patronage of Riyadh's arch rival, Tehran - may entice Saudi Arabia to cultivate stronger ties.
"Hamas is in play," said Hussein Ibish, senior fellow at the Washington-based American Task Force on Palestine. "The Saudis have to ask themselves whether they want to simply stick with the PA or also get involved in the game of trying to court Hamas. And that raises the same question everyone is going to have to answer - particularly the United States and Israel: which group of Palestinians do they want to empower?"
A shift in Saudi policy would probably come slowly, but it could affect both the political dynamics of the region and the prospects for reopening the Arab-Israeli peace process.
Saudi Arabia has the region's deepest pockets, arguably the closest relationship with the US and a long history of behind-the-scenes involvement in efforts to find peace in the Middle East."The Saudis have become domestically focused, plus, they're trying to deal with the Arab Spring," said Kamran Bokhari, the London-based vice president for the Middle East and South Asia at Stratfor, which provides security analysis. "But the Gaza conflict will push the Saudis to say, 'We've been out of this for a while; it's time we go back in'."
In the lead-up to the Iraq war in November 2002, Saudi's then-Crown Prince Abdullah bin Abdulaziz sent a letter to George W Bush asking the US president to "confirm to us that you will be seriously engaging in solving the Middle East problem" in exchange for his support.
Saudi Arabia did not always favour Fatah over Hamas in Palestinian politics. In the early 2000s, US law enforcement officials estimated that as much as half of Hamas's operating budget, about US$10 million, came in cash from Riyadh.
But in the aftermath of the September 11, 2001, attacks on the US, Washington put heavy pressure on Saudi authorities to steer clear of Hamas, which the US calls a terrorist organisation. Saudi funding for Hamas dried up around 2004, according to testimony before the US senate by a treasury official a year later.
In the years since, Riyadh has repeatedly come to the financial aid of the PA in Ramallah. In July, Saudi Arabia announced that it would inject $100m (Dh367.31m) in emergency cash to the PA, which relies heavily on external budget support. Last year, Saudi Arabia contributed at least $200m.
But Riyadh has never abandoned its relationship with Hamas, said Ghassan Al Khatib, a former PA spokesman who now teaches at Bir Zeit University in the West Bank.
Despite receiving international support, the PA has seen its public support among Arabs drop in recent years over a failure to win concessions from Israel. Its continuing attempt to win recognition at the United Nations has so far only lost it financial backing; the US put a months-long hold on funding to the PA over the issue.
Hamas, by contrast, seems to be gaining leverage. A Muslim Brotherhood-inspired organisation, Hamas seems at ease dealing with ideological allies who now run the governments of Egypt and Tunisia.
Its armed resistance secured real gains in the latest clashes with Israel, despite a heavy cost. In the recent ceasefire, Mr Meshaal won a minor relaxing of the economic blockade on Gaza. "This last escalation between Gaza and Israel increased dramatically the political prominence of Hamas, not only among Palestinians in the Occupied Territories but also among Palestinians everywhere and Arab people more generally," said Mr Al Khatib. "The PA has taken the peace negotiations approach, which seems to be not working to Israel and US. Hamas went about things using the resistance approach which, at least this time, wasn't defeated."
Riyadh would likely struggle to completely displace Iran as a Hamas benefactor, since close ties to the US would preclude Saudi Arabia from arming the organisation. Still, the regional balance would almost certainly be altered if Hamas's patrons were largely allies of the West, rather than foes.
Mr Ibish argues that Hamas itself may change if it won broad international backing.
"If Hamas inherits or comes to dominate the Palestinian movement, the question is, will they adapt, and in what way?" he asked.
"Will they moderate? Will they become even more extreme? Will other radical forces emerge? It's in the least not clear. But the point is that there is a decision for everybody, especially the traditional backers of the PA, about whether they want to make that kind of open-ended gamble."