At home, too, continued support for the Syrian rebels seems to be the prevailing sentiment of the pro-Erdogan masses, which figured prominently in foiling the coup attempt, heeding calls from mosque minarets to confront the putschists in the streets.

The signals of a policy shift may have irked Ankara’s friends in the Gulf, yet many players on the ground continue to count on President Recep Tayyip Erdogan, as evidenced by their reactions to the coup attempt. Ahrar al-Sham condemned the botched bid, while Syrian refugees joined anti-coup demonstrations in Turkey. In contrast to Egypt, which blocked a condemnation of the coup attempt at the UN Security Council, Qatar , the Muslim Brotherhood and Hamas expressed strong support for Erdogan, which should be seen as a message for him to stay on his current course.

A number of issues bear on Turkey’s Syria policy: Turkey’s perceived inadequate support for the international coalition against the Islamic State (IS); its hostile policy toward the Kurds in northern Syria; support for groups fighting the Syrian government; and disagreements on targeting Jabhat al-Nusra, al-Qaeda’s Syrian branch and other Salafi groups such as Ahrar al-Sham.

Along with its many implications at home, the July 15 coup attempt in Turkey may have important repercussions on Ankara’s foreign policy, especially regarding Syria.

The real pressure for a policy shift comes from external factors, including terrorist attacks blamed on IS, the struggling revolution in Syria and the vital importance of economic and political ties with regional heavyweights such as Russia and Iran at a time when relations with the West have soured.

The coup turbulence is likely to affect the list of Erdogan’s foreign friends as he drags Turkey even faster down the road of an authoritarian, party-state rule. One should have no doubts that Erdogan this week kept a tally of which countries condemned the coup attempt, which kept silent and which waited to see who would prevail. The support of two countries — Russia and Iran, both Turkey’s rivals in Syria — must be thickly underlined in his book now.

Unlike Ankara’s Western allies, Iran did not wait for the coup’s failure to speak up. Foreign Minister Mohammad Javad Zarif voiced support for the government in Twitter messages in the early hours of the unrest. In a subsequent phone call, President Hassan Rouhani told Erdogan the coup attempt was “a test to identify your domestic and foreign friends and enemies.”

In contrast, Saudi King Salman bin Abdul-Aziz Al Saud, Turkey’s ally in Syria, congratulated Erdogan for suppressing the attempt — two days after it failed. Sources close to Iran are zestfully reporting claims that Saudi Arabia and the United Arab Emirates were involved in the coup attempt, in an apparent hope this might encourage Ankara to change its axis.

When it comes to Washington’s stance, Erdogan is less than satisfied. Senior members of his Justice and Development Party (AKP) have even charged that the United States backed the coup leaders. Speculation about covert US support is fanned by reports that Turkish tanker aircraft taking off from Incirlik Air Base, where US forces are also stationed, refueled the F-16 jets the putschists used, and that the base commander, now arrested, had approached US officials for asylum.

The United States denies backing the coup, but the controversy is now there as a new test area for Turkish-US ties.

The turmoil threatens to strain relations with the European Union, too, as the crackdown on suspected pro-coup forces looks likely to go beyond the bounds of law. Calls to reinstate the death penalty, the prospect of grave human rights violations and an all-encompassing witch hunt against government opponents emerge as potential issues of a showdown with European partners.

Regarding Syria, Turkish tensions with the United States and the EU stem mainly from their demands for a stronger Turkish role in the anti-IS coalition and their cooperation with the Syrian Kurds’ People’s Protection Units (YPG) and the Democratic Union Party (PYD), which Ankara sees as terrorist groups.

The lockdown of the Incirlik base, though temporary, has raised questions about the future of anti-IS operations. Despite all the friction, Ankara can ill afford to backpedal from its commitments to the international community while IS militants are stepping up their global campaign and risk reducing Turkey to a pariah state.

Moreover, Ankara’s “Incirlik card” is slowly losing leverage amid US efforts to reduce reliance on the southern Turkey base. Washington is already using a base in neighboring Iraqi Kurdistan. Also, a Kurdish source told an Iraqi news agency July 18 that the United States has plans to set up five more bases in the region under an unconfirmed military deal with the Kurdistan Regional Government earlier this month.

Europe, meanwhile, is not likely to ease pressure on Erdogan with respect to IS, no matter how strong he emerges from the coup clamor, which coincided with the carnage in Nice. French Foreign Minister Jean-Marc Ayrault has already warned that the coup attempt is no “blank check” for Erdogan to muzzle political opponents, and Ayrault questioned Ankara’s commitment to fight IS.

“There are questions that are being asked, and we will ask them,” Ayrault said. “[Turkey] is partly viable, but there are suspicions as well. Let's be honest about this.”

No matter how much it wrangles with the West, Turkey can ill afford the label of IS sponsor.

Another post-coup question is whether Erdogan could accommodate the Kurds now that he has significantly strengthened his hand at home. So far, Ankara has given no signal that it may change its hostile policy regarding the YPG and PYD in Syria, or end the war on the Kurdistan Workers Party (PKK) at home. True, the AKP government displayed some moderation toward the Kurdish-dominated Peoples’ Democratic Party (HDP), postponing the prosecution of HDP lawmakers, but that was because it needed a national consensus against the coup. Apart from that, the policy of conflict and polarization continues to be Erdogan’s driving force. After the June 7, 2015, elections, Erdogan successfully used escalation tactics to consolidate his nationalist-conservative base. With the botched coup, these popular masses have further closed ranks behind Erdogan and have to be kept satisfied, so it seems, until he pulls off his goal of installing a presidential regime.

On another note, PKK leaders had repeatedly accused Gulenist circles in the army and the police of sabotaging the peace process with Ankara. Fethullah Gulen is a now-US-based cleric whose followers are held responsible for the coup attempt. Now that a massive Gulenist purge is underway in all sectors of the state, one may wonder whether things could change in favor of the Kurds. An outright conclusion to that effect, however, would be naive, given that Kurd phobia is almost inherent in the institutional impulses of the Turkish state.

The most significant prospect in the coup aftermath is the possibility of further rapprochement with Russia and Iran to settle regional problems. The two Turkish pilots who downed the Russian jet are reportedly among the arrested putschists, which could help to expand the revived dialogue with Moscow.

In sum, Erdogan has two options on Syria: to maintain the status quo and ride the wave of solid nationalist-conservative support, or to take further steps toward change by boosting cooperation with Russia and Iran. The second option merits stronger consideration, given the additional external factors at play. Yet even an eventual policy shift would not necessarily mean a moderation in Turkey’s fierce objections to Kurdish autonomy in northern Syria. The institutional constituents of both the state and the government reject Kurdish self-rule on the other side of the border as long as the Kurdish problem at home remains unresolved.