How two Middle East powerhouses fell out, then made up

Turkish President Recep Tayyip Erdogan (L) and UAE's de facto ruler Sheikh Mohammed bin Zayed.

Abu Dhabi, UAE (CNN)The speed of the shifts in the Middle East's geopolitical scene is enough to give even the most seasoned regional observers whiplash

Longtime foes Iran and Saudi Arabia are talking, the UAE is trying to mend ties with Iran, and Qatar was welcomed back into the Gulf Cooperation Council after an unprecedented rupture in relations. A thaw in Turkish-Egyptian relations is also on the horizon and Turkish-Israeli reconciliation is in the works.
But perhaps the most stunning rapprochement has been between the UAE and Turkey -- few saw that one coming. The two were pitted against each other in almost every regional conflict for the better part of the past decade and found themselves on opposite ends of the ideological spectrum.
    In the latest sign of reconciliation, Turkish President Recep Tayyip Erdogan arrived in Abu Dhabi on Monday to meet with the crown prince of Abu Dhabi and the UAE's de facto ruler Sheikh Mohammed bin Zayed (known as MBZ) and sign new agreements. It was Erdogan's first official visit to the UAE since 2013.
      "The reconciliation I saw [as] least likely... [with] the most problems [and] divergent interests, was that of the UAE and Turkey," Turkish foreign policy expert Yusuf Erim told CNN.
        Turkish President Recep Tayyip Erdogan (L) is welcomed by Emirati officials after arriving at Abu Dhabi's international airport Monday.
        The rift emerged after Turkey publicly supported the Arab Spring protests that unseated some Arab governments and threatened others in 2011. Erdogan was one of the staunchest backers of Muslim Brotherhood-affiliated groups that played a significant role in some of those protests. That was a red line for Arab monarchies, including the UAE, which viewed those movements as an existential threat.
        For Turkey, the turning point with the UAE came in 2016, after Erdogan survived an attempted coup that Turkish officials accused the UAE of backing. The following year, when Qatar's neighbors, including the UAE, boycotted the country for its alleged ties to Islamists, Turkey lent its support, further aggravating Abu Dhabi.
          The regional powers faced off in a dangerous rivalry driven by their expansionist foreign policy that stretched from the Eastern Mediterranean to the Persian Gulf and East Africa. But nowhere did it unfold as perilously as in Libya, where they engaged in a devastating proxy war from 2019.
          Signs of a détente finally began to appear last summer, first with a surprise visit to Ankara by the UAE's national security adviser, then with a call between Erdogan and MBZ.
          The call marked "a new phase ... in which the UAE seeks to build bridges ... to ensure future decades of regional stability" said Anwar Gargash, diplomatic adviser to the UAE president. Local media has referred to the relationship as a "strategic partnership."
          Then, in November, Sheikh Mohammed arrived in Ankara for his first visit in a decade, welcomed with fanfare and a flag-waving cavalry. It had become clear by then that the status quo was unsustainable, especially at a time of perceived American disengagement from the Middle East, which risks leaving many of America's allies with no option but to fend for themselves.
          There was a clear shared desire to recalibrate both their foreign policies in a way that would benefit their respective economies. The two were perfectly positioned to shift to a more conciliatory approach.
          Faced with a coronavirus-related downturn, increased economic competition from neighboring Saudi Arabia and the growing cost of military engagements in the region, the UAE declared last summer that it was adopting a foreign policy U-turn. While it said that its external relations would now be determined by economic interests, the departure of President Donlad Trump and a desire to play a greater diplomatic role in the region was also a factor in the policy shift.
          At the same time, Turkey's economy was tanking. Annual inflation reached near 50% and by the end of last year, with its currency losing half its value against the dollar. Ankara could no longer afford to alienate rich Gulf states.
          Erdogan's rise to power in 2002 has been be attributed to the economy -- he doesn't want it to now become the cause of his downfall. The president has promised to turn the economy around, knowing that failure to do so would have him pay dearly at the polls next year. He's banking on the UAE and other Gulf Arab states to inject billions into Turkey.
          "The economy is very, very important for the Turkish president," Erim said. "A weaker economy before 2023 elections is definitely something he doesn't want, and the Emiratis have the money to be able to provide a booster shot for the Turkish economy."
          The money has already started flowing: the UAE has announced a $10 billion Turkey investment fund and a nearly $5 billion currency swap to boost its foreign exchange reserves. Better relations will also mean a return of Gulf Arab tourists next summer, bringing in much-needed hard currency.
          The economy may be a key driver for Erdogan. But this burgeoning relationship is part of the wider jigsaw of realignment being witnessed in an ever-changing Middle East.

          Other top Middle East news

          Iranian oil exports increase as talks in Vienna resume
          Increased shipments to China have nudged Iran's oil exports past 1 million barrels per day for the first time in almost three years.
          • Background: Sanctions aimed at cutting Tehran's oil flow were imposed after former United States President Donald Trump exited the 2015 nuclear agreement, but China has provided an outlet through intermediaries. Iran said on Monday that nuclear talks in Vienna have not reached a dead end.
          Saudi-led coalition attacks Houthi ministry of communications
          The coalition attacked the ministry in Yemen's capital Sanaa on Monday, saying it was used to "to support hostilities."
          • Background: The raid destroyed a Houthi communications system used to operate front communications stations that controls drones, according to the coalition.
          • Why it matters: the raid comes as Iran-backed Houthis step up attacks against coalition forces, particularly the UAE, with drones and missiles.
          Iraqi court bars Zebari from running for presidency
          Iraq's Supreme Federal Court ruled that former Foreign Minister Hoshyar Zebari is not eligible to run for the presidency amid corruption allegations.
          • Background: The court said a decision by parliament to accept his presidential bid was incorrect and it also barred him from running for the post in the future. Zebari called the court's decision "an injustice."
          • Why it matters: The court decision is a blow to populist Shiite Muslim cleric Moqtada al-Sadr, who was the biggest winner in parliamentary elections in October. Parliament had been due to vote on a new head of state last Monday but canceled the vote because it lacked quorum.

          What we're watching

          Libyan presidential elections planned for December were postponed after political infighting and administrative delays. In the ensuing state of limbo, the parliament in eastern Libya appointed a new prime minister and now the country is grappling with dual premierships.
          Jomana Karadsheh breaks down the complicated political s