However, despite simmering tensions between Turkey and the West, Ankara is unlikely to change sides and abandon its Western allies, according to Basheer Nafi, a senior research fellow at the Al Jazeera Centre for Studies.
Nafi's view is that after Yildirim assumed his position as Turkey's PM, Ankara took efforts to mend its relations with Moscow and Tel Aviv, tried to normalize its relationship with the United Arab Emirates and signaled that it is determined to improve its ties with Iraq and Egypt.
"As observers of Turkish politics were anticipating further steps to be taken, the failed coup attempt took place on the evening of 15 July," Nafi notes in his article for Middle East Eye.
The researcher stresses that the failed coup has served as a litmus test for Turkey's foreign policy priorities.
"On the other hand, the media in some Arab countries could not conceal their happiness over what seemed like an imminent collapse of Turkey's elected government. Others behaved as if they had prior knowledge of the coup attempt," Nafi points out.
Thus, unexpectedly, Egypt blocked a draft UN Security Council resolution condemning the failed coup and calling upon all parties to respect the legitimate Turkish government.
At the same time evidence began to emerge that the United Arab Emirates and Saudi Arabia could have been aware of the coup before it erupted and even supported it.
Remarkably, it was Russia that instantly condemned the putsch attempt and lent its helping hand to Ankara.
So, what does the future have in store for Turkey's foreign policy?
In response to Recep Tayyip Erdogan's Wednesday ultimatum regarding Gulen's extradition to Turkey, US State Department spokeswoman Elizabeth Trudeau said that the process could take years.
As for the EU, Ankara has recently accused Brussels of fuelling anti-Turkish sentiment in Europe.
"Unfortunately the EU is making some serious mistakes. They have failed the test following the coup attempt… Their issue is anti-Turkey and anti-Erdogan sentiment," Foreign Minister Mevlut Cavusoglu said, as quoted by Reuters.
Likewise Turkey's rapprochement with Egypt and UAE is now hanging in the balance.
In the wake of the recent developments, the question on everyone's lips is whether Ankara will ultimately side with Russia and change its stance on Syria and President Bashar al-Assad.
According to Nafi, the idea that Turkey will join Russia and Iran while abandoning its Western allies is an "exaggeration" that "lacks any solid evidence."
"Despite increasing tensions, there is nothing to indicate that Ankara plans to cut ties with Washington or the EU," he stresses, admitting, however, that "Turkish policies are undoubtedly more independent of the American policy today than before."
However, Turkish journalist Mehmet Y. Yilmaz is not so sure that the essence of Turkish policy will remain unchanged.
Citing the fact that Russian President Putin and Turkish leader Erdogan spent two-and-a-half hours discussing the Syrian issue and calling attention to the creation of a "new mechanism" of military cooperation in Syria by Ankara and Moscow, the journalist suggests that there are clear signs of change in Turkey's Syrian policy.
"These developments make me think that following the discharge of Ahmet Davutoglu from the position of prime minister, there has also been an ideological discharge in our foreign policy issues," Yilmaz writes in his article for Hurriyet Daily News.
Similarly, Turkish journalist Serkan Demirtas calls attention to Erdogan's remark that Russia is "the most important and primary actor in bringing peace to Syria."
"This statement does not necessarily mean that Turkey will halt all of its partnerships with the US-led anti-ISIL coalition, but it clearly portends to a potential change in Ankara's priorities and partners on Syria," Demirtas suggests in his opinion piece for the media outlet.
For his part Turkish observer Sadik Unay highlights that Russo-Turkish cooperation has reached a new level through acquiring "military and geostrategic elements."
"At this critical juncture, one could even think that Ankara might be closer to taking radical steps such as joining the Shanghai Cooperation Organization (SCO) with observer status or renewing the bid for the cancelled air missile defense system contract by inviting Russian companies," he underscores in his analytical report for Daily Sabah.
"When Ankara's strategic rebalancing between NATO and Russia materializes, it will not be a manifestation of ideological Eurasianism, but of a purely rational, multipronged, proactive diplomatic line expressing the national will," Unay concludes.