ABU DHABI // Four months after Mohammed Morsi became Egypt's first democratically elected president, the Muslim Brotherhood deputy leader, Khairat Al Shater, flew to Qatar to speak about the challenges of the transition.
It was a moment when political Islam seemed to be on an inexorable rise, from Tunis to Cairo to Tripoli.
Doha played host to intellectuals from all these countries as well as Muslim Brotherhood figures from Sudan, Jordan and Syria.
"Given the public support for Islamists, now is the time to question them" about how they will govern, an adviser close to Qatar's Emiri Diwan said.
Fast forward eight months and across the region the Brotherhood's momentum has shifted from rise to retreat. Mr Morsi was ousted by Egypt's military just a year into his term and Mr Al Shater was one of a dozen Brotherhood leaders arrested over the weekend amid a crackdown on the Brotherhood's political arm, the Freedom and Justice Party.
The result, especially in the Arabian Gulf, has been a reinvigorated debate over the Brotherhood's regional ideology - and influence.
Since 2011, there have been tensions between countries sceptical of political Islam, especially Saudi Arabia and the UAE, and Qatar which backed the Muslim Brotherhood's emergence as a political force. With different strategies but equally deep pockets, Riyadh and Doha in particular have often supported regional allies with conflicting political visions.
Mr Morsi's fall has handed a resounding moral victory to the anti-Brotherhood camp.
"Qatar's Middle Eastern diplomacy now lies in ruins: it failed to produce dividends in Libya, backfired in Syria and now collapsed in Egypt," said Jonathan Eyal, head of international relations at Britain's Royal United Services Institute.
The shifts in Cairo also come at a unique time for Qatar, which had a leadership change of its own weeks before Mr Morsi was ousted.
The new emir, Sheikh Tamim bin Hamad Al Thani, worked meticulously before his ascension to reconcile his country's often tense relationship with Saudi Arabia. Then on Friday, he joined the UAE and Saudi in congratulating the military-installed interim president in Cairo. It remains unclear how close the relationship will be.
Some analysts see the opportunity for Qatar's foreign policy to shift.
"The changes in Egypt represent another opportunity for Qatar to recalibrate its strategy and distance itself from the apparent alliance with the Muslim Brotherhood, which has alienated many liberals and secularists across the Arab world," said Jane Kinninmont, a fellow at Chatham House who follows Arabian Gulf affairs.
"The quick congratulations [to the new interim president] reflects a wider concern with rebalancing Qatari foreign policy and making it more in line with the other Gulf countries."
If Mr Morsi's fall tempers Doha's foreign policy, it may also rattle Islamist groups in countries such as Kuwait, Bahrain and Oman, where branches of the Muslim Brotherhood operate openly. All these countries have tacitly recognised the new leadership in Cairo, declining to say much more.
"Whatever happens in Egypt will have a major impact on the way of thinking of political classes and groups," said Shafeeq Ghabra, political science professor at Kuwait University. "On the official level in Kuwait, there is enthusiasm for the change [in Egypt]. But at the social level, people are divided."
A half century ago, Muslim Brotherhood exiles landed in the Arabian Gulf but governments saw the Brotherhood becoming a national security issue as it began to organise and gain supporters. In Qatar, the Brotherhood disbanded in the early 1990s in an agreement with the government, but groups continued to try to operate in the UAE and Saudi Arabia.
But beginning in 2011, Doha pitched itself as an intellectual centre to debate political Islam, hosting Egyptian-born Sheikh Youssef Al Qaradawi, as well as media outlets and think tanks sympathetic to them. Qatar became the largest single donor to Egypt, pouring in an estimated US$5 billion (Dh29.4 billion) in grants, loans and bond purchases in the past year to save the tanking economy.
Leaders in Doha have repeatedly denied claims that they back the Brotherhood, pointing out that they supported Egypt's economy even before Mr Morsi was elected.
The new emir seemed to emphasise this point in recognising the military-installed president in Cairo on Thursday. "Qatar will continue to respect the will of Egypt and its people across the spectrum," said the foreign ministry.
Qatar condemned yesterday's killing of dozens of Mr Morsi's supporters and called for "quick solutions" through "dialogue, in order to preserve the security, safety and stability" of Egypt, reported the state news agency.
But Qatari officials have still to break the perception of a Qatari bias towards the Brotherhood, both in Egypt and the Gulf.
One reason is the same intellectual brotherhood network that Qatar is now set up to host. On July 6, Sheikh Al Qaradawi, who often appears on Qatar-owned broadcaster Al Jazeera, called directly for Mr Morsi's reinstatement.
Some Qatari investments allowed under Mr Morsi's rule also remain controversial. Qatar National Bank's purchase of a controlling stake of National Societe Generale Bank Egypt, finally completed in March, was plagued by rumours - untrue according to one banker involved in the deal - about Doha's plans to gut the bank by cutting the Egyptian staff.
"Qatar has become widely loathed by ordinary Egyptians, who believe, perhaps erroneously, that the emirate is using its enormous natural-gas wealth to buy up Egyptian assets," said Simon Henderson, a senior fellow at the Washington Institute for Near East Policy.
Meanwhile, he said, "Qatar's Arab neighbours hate its approach to Egypt."
The reaction from Arabian Gulf leaders to the latest turmoil in Egypt so far suggests a more unified approach.
The Saudi king, King Abdullah bin Abdulaziz Al Saud, on the weekend received a call in Riyadh from the head of the Egyptian military, Gen El Sisi. The king urged the general to use "wisdom" in leading the country to ensure "steady stability and security".
Saudi Arabia and the UAE both cooperated economically with the previous government of Hosni Mubarak, but largely retreated since 2011. The installation of the new interim government is likely to change that calculation.
Egypt's Central Bank governor, Hisham Ramez, was in Abu Dhabi on Sunday and, although no further details of his visit have been released, Egyptian bond yields fell in hopeful anticipation of forthcoming financial assistance.
Qatar will also continue its support, said Mahjoob Zweiri, head of the humanities department at Qatar University, unless Cairo decides otherwise.
"Saudi Arabia and the UAE seem very happy with what happened in Egypt. But Qatar - taking into consideration the official statements - also has no objection to what happens if this is the will of the people."