In the latest attempt to break Turkey’s regional isolation, Turkish Foreign Minister Mevlut Cavusoglu wrapped up last week what he described as a watershed visit to the United Arab Emirates. He held meetings with high-ranking leaders and successfully improved ties with a key Arab state that has opposed Turkey’s pro-Muslim Brotherhood regional policies. The U.A.E. announced during the visit that it has decided to appoint an ambassador to Turkey after three years of coldness in ties.

The visit was the first high-level official visit from Turkey since May 2013 as relations between the two countries soured over the toppling of Egypt’s first democratically elected president, Mohammed Morsi, in July 2013. The U.A.E., which has become one of the main financial supporters of the Sisi regime, withdrew its envoy from Ankara after the Turkish leadership strongly criticized the coup in Egypt and the Arab countries that lent support to Abdel Fattah el-Sisi.

At the root of the problems between the two countries has been their differing views on the Muslim Brotherhood. Since the outset of the Arab Spring, the U.A.E. has been waging a campaign against the Muslim Brotherhood's local branch, known as al-Islah Society, arresting approximately 100 members of the group before declaring the Muslim Brotherhood a terrorist organization in November 2014. Turkey, on the other hand, has become a safe haven for those Muslim Brotherhood members escaping from Egypt and the U.A.E.

The rapprochement with the U.A.E. comes at a time when Turkey finds itself increasingly isolated in a troubled region. It has no ambassador in Cairo, and ties with Israel, Iraq and Iran remain cool at best. Despite frequent statements from both parties that a normalization in relations is imminent, Turkish-Israeli ties still remain strained with several roadblocks remain on the path to full normalization.

Ankara has been drawn into the conflict in Syria, partly due to its own ill-fated policies, and lambasted by its Western allies for allowing foreign jihadists to cross its borders. Turkey has attacked P.Y.D. targets in northern Syria in the face of U.S. attempts to build an alliance with the Kurdish group to fight the Islamic State, and has dragged its feet to take a 60-mile long territory held by ISIS across the Turkish border in Syria—a long-time U.S. demand.

The Turkish-European controversial deal intended to halt illegal migration to Europe rekindled Ankara’s hopes to revive the long-stalled membership process. The initial favor with the E.U., however, seems to be fading with concerns about freedom of expression and Ankara’s threats to back out of the deal if the E.U. fails to provide visa-free travel for Turks by June. Turkey’s relations with Russia remain tense since Ankara downed a Russian jet for violating Turkish airspace in the fall.

Turkey has been reaching out to regional actors with which Ankara has fallen out in an effort to break its isolation. Turkey's relations with Saudi Arabia have markedly improved under the new Saudi ruler, King Salman, after years of tension due to the military coup in Egypt and conflicting policies over the Muslim Brotherhood. The two countries are closely coordinating their support of the Syrian rebels and the Saudis have been actively promoting normalization between Turkey and Egypt and the U.A.E. Turkish President Recep Tayyip Erdogan reportedly authorized renewing contacts with Egypt at the ministerial level earlier this year. Turkey has also been trying hard to mend ties with Israel, but Ankara’s supportive stance on the Muslim Brotherhood and Hamas remains the main roadblock on the path to full normalization with these countries.

Thousands of Egyptians who left their country fearing legal action after the military coup are living in Turkey. Among them are some Brotherhood leaders, who are actively trying to build a coalition of their own, meeting Western lawmakers, opening satellite news stations, even petitioning international courts that may have some jurisdiction over Egypt. The masterminds behind the killing of Hisham Barakat, Egypt’s chief prosecutor, last June are Muslim Brotherhood operatives now living in Turkey, who were trained by Hamas operatives in Gaza. Exposing the connections of the suspects in Barakat’s murder strengthens Egypt’s hand in the international legal arena against Turkey. It has already asked Interpol to locate and extradite to Egypt those Brotherhood operatives involved in the case.

This has been an issue in Turkey-Israeli rapprochement as well. Israel is demanding that Turkey remove all Hamas operatives from its soil while Egypt has been voicing its discontent over Turkish-Israeli rapprochement. The U.A.E. has also raised the issue with Ankara several times, demanding that Turkey do not give shelter to dissidents from the U.A.E., but to no avail.

Turkey has long used its pro-Muslim Brotherhood and Hamas stance to advance its soft power in the region and appeal to its conservative constituency at home. But these policies today are harming its already eroded position in the region, and remains an obstacle in its efforts to break its regional isolation. The options that confront Erdogan are either prioritizing the Muslim Brotherhood at the cost of its relations with its neighbors, or ending its regional isolation at the expense of the Muslim Brotherhood. Whether Turkey will recalibrate its policy remains to be seen, but it will be a difficult decision for Erdogan.