Turkish President Recep Tayyip Erdogan has emerged triumphant and possibly stronger from a failed coup attempt, meaning that Turkey's pivotal roles as an ally in the U.S.-led war against the Islamic State group and a guarantor of refugee agreements with Europe are likely to remain intact for now.
However, looming tension over Fethullah Gulen, a U.S.-based Islamic cleric blamed by Erdogan for the rebellion, could strain ties between Turkey and the United States, which says it would assess any Turkish extradition request. Gulen denies involvement in the unrest.
An expected purge of military factions responsible for the attempted putsch, however, could leave the armed forces in turmoil and overstretched. While trying to rebuild with loyalists, the military must continue to confront autonomy-seeking Kurdish rebels in Turkey and control its turbulent border with war-torn Syria.
Turkey is a strategic US ally at the crossroads of the Asian and European continents and abuts Mideast conflict zones. It is a majority-Muslim country in NATO and a key partner in efforts to solve international challenges, including terrorism and mass migration, as well as being an important interlocutor with regional powers such as Iran and Russia.
U.S., European and other world leaders have condemned the assault on Erdogan's democratically elected government, while watching for further fallout from the uprising on Turkey, which was seen as a generally stable partner in a neighborhood plagued by upheaval.
The United States is monitoring the situation closely, in part because it stages air strikes from Turkey's Incirlik air base against Islamic extremists in Syria and Iraq. The Turkish government closed the airspace around Incirlik for several hours on Saturday following the coup attempt, although there was no indication of a long-term negative effect on US operations.
The uprising was launched Friday night with military jets overhead, tanks and soldiers in the streets and firepower that left at least 161 dead and 1,440 wounded, according to the government. It appears to have been led by air force, military police and armored units, but not the senior commanders of the military, who closed ranks behind Erdogan and put down the putsch early Saturday. Even opposition political parties condemned the attempt to oust the government.
Nearly 3,000 accused plotters already have been detained and new purges in the military are expected to remove any sympathizers among soldiers and officers. This continued internal turmoil could be a challenge for the armed forces as they battle Kurdish rebels and support the campaign against the Islamic State group.
On Saturday, Turkey's state-run news agency said the commander of the country's second army was arrested in connection with the coup. The second army is based in eastern Turkey to counter threats from Syria, Iran and Iraq.
"A new wave of purges in military will likely weaken overstretched security services... even if basic policies will remain same," said Howard Eissenstat, associate professor of Middle East history at St. Lawrence University in Canton, New York.
Erdogan, an often combative figure, has been accused of increasingly autocratic conduct even though his government was democratically elected and he commands deep support among Turkey's pious Muslim class. The military has long seen itself as the guarantor of secular government in Turkey, and many in its ranks have bristled at both his tightening grip on power and the growing Islamic influence under Erdogan. The president had jailed or sidelined many of his military adversaries, but clearly others remained to launch the failed coup.
In the international arena, Erdogan recently sought to patch up disputes with Israel and Russia, and to lend stronger support to U.S.-led efforts against the Islamic State group after being accused of tolerating the flow of foreign extremists and weapons from Turkey into Syria. He also was key to an agreement with the European Union that provides for the safe, regulated passage of Syrian civilians between Turkey and Europe, which has received a massive influx of refugees.
While that pragmatic approach is likely to continue as Erdogan shores up international support after the coup attempt, the president has often lashed at out his Western partners, questioning their commitment to democratic values and alleging that Kurdish militants enjoy refuge in some European countries.
The United States, emphasizing the importance of its alliance with Turkey's current leadership, expressed support for the democratically elected government as the violence unfolded. U.S. Secretary of State John Kerry was quick to speak with Turkey's foreign minister. That response contrasted with U.S. comments after the Egyptian military ousted Islamist President Mohamed Morsi following protests against him in 2013 — at that time, Kerry said the military was restoring democracy in Egypt.
Although many Turks are disgruntled over Erdogan's moves against civil liberties such as freedom of the press, and are fearful in the wake of a deadly IS attack on Istanbul's Ataturk Airport last month, the country appeared to reject the military rebellion. It endured three military coups between 1960 and 1980.
Yet Turkey could be poised for a fresh bout of polarization under Erdogan, who vowed that the coup plotters would pay a heavy price. Domestic tension and suspicion, in turn, could undermine the consistency or effectiveness of Turkey's international commitments and challenges, particularly when the military is involved.
"Bottom line is the relationship between the government and the military, no matter how loyal the generals may claim to be in future, is broken for good," Chris Kilford, a former Canadian military attache in Turkey and an expert on the Turkish military, wrote in an email to the AP.
Christopher Torchia was Associated Press bureau chief in Turkey from 2007 until early 2013.