Vince Dhimos answered a question at Quora.
Q: WHY ARE TURKEY AND QATAR BEST FRIENDS?
Speaking of a friendship with the cantankerous Tayyip Recep Erdoğan, who clearly wants to restore Ottoman glory appointing himself as caliph, is a bit of a stretch, but at least Doha and Ankara have had good relations for some time now.
Both Turkey and Qatar have reason to be at loggerheads with Saudi, but for different reasons, and it is mainly this conflict with Saudi that drives them together.
The Qatari TV station Al-Jazeera took a critical view of Gulf state policies and also supported Islamic groups that opposed the Kingdom. One of the charges levelled by the Gulf States and Egypt against Qatar is that they support terrorism.
A major bone of contention with Saudi is that Qatar has a mutually beneficial agreement with Saudi adversary Iran over a shared gas field in the Gulf, the richest in the world, and in terms of politics, the two have had no serious quarrels, though philosophically, they have little in common. Qatar once supported the very jihadists that Iran is still fighting in Syria and Iraq, so their close relationship is a near miracle. (a lot like the Erdoğan-Putin relationship).
In a major affront to Saudi, Qatar offered to host a US air base, Al Udeid, in 2002, after Saudi had refused to cooperate with the US over the Iraq War. This guaranteed protection of Qatar from any incursions by the forces around Saudi arrayed against the former and made Qatar a serious, and untouchable, adversary. In 2017, Saudi, Bahrain, Egypt and the UAE all cut ties with Qatar.
Now as for Turkey, it has both military and economic ties with Qatar, including contracts for Qatari gas supplies. Turkey also has a military agreement with Qatar and has stationed troops there. Both countries support the Muslim Brotherhood, to the chagrin of Saudi, and also of Egypt, whose President Sisi has banned the group.
Further, the Kashoggi murder caused a rift between Saudi and Turkey. The murder occurred in a Saudi embassy in Turkey. It was a worst case scenario because Kashoggi, also sympathetic to the Muslim Brotherhood, bitterly opposed to Saudi, had been a friend of Erdoğan. This helps explain why Erdoğan so vehemently denounced the killing and went so far as to openly accuse crown prince Mohammed bin Salman (MBS) of being behind it, causing an international furore and prompting the US Congress to pass a sense of Senate resolution censuring Saudi for the killing. (This was opposed by Trump, who displays a blind loyalty to MBS).
In view of the above, there is no reason why Turkey and Qatar should not enjoy cordial relations and every reason for them to be friends – sort of.
An important lesson to be drawn from this strange relationship is that in the Middle East, even countries with apparently incompatible differences can, and do, find common ground when it comes to cooperation in vital areas such as security and economics. This gives us hope that even the most seemingly implacable enemies can find compromise. Perhaps even Saudi and Iran. The only thing missing for such compromise is US approval. And that means a complete foreign policy makeover.
The US public, not the Deep State, could be the biggest obstacle.