ISTANBUL—Turkey was riding high in 2010, casting its brand of Islamic piety, Western-style democracy and economic growth as a regional model amid popular upheavals in the Mideast and North Africa.
Six years later, it is mired in tension with neighbors and allies, dominated by a president seeking to increase his constitutional powers and now enmeshed in a purge of large sectors of society after an uprising by renegade military officers.
The changes that led to this turn in Turkey's fortunes include internal rifts—the collapse of a Kurdish peace process and the alleged erosion of democratic rights under President Recep Tayyip Erdogan are among them—as well as the war in Syria and other regional chaos in which Turkey has taken sides.
Erdogan is also sparring with the United States, a NATO ally, over his demand that Washington extradite Fethullah Gulen, the U.S.-based Muslim cleric Turkey accuses of orchestrating the July 15 coup attempt.
And on Aug. 9, the Turkish president is scheduled to meet Russian leader Vladimir Putin in an effort to repair strained ties following Turkey's apology for shooting down a Russian fighter jet last year. The breach has cost Turkey an important source of tourists, and stalled energy deals.
Turkey's trajectory in the past decade represents the struggle of a strategically located nation, spanning the Asian and European continents, to shine on an international stage. Now, after the failed uprising, the government is trying to rid the military, judiciary and other institutions of suspected Gulen supporters.
Nearly 16,000 people were detained for questioning over suspected links to the coup attempt, and about half were arrested to face trial, Interior Minister Efkan Ala said.
On Wednesday, Turkey discharged close to 1,700 officers and junior officers from the military, including 149 generals and admirals.
The government also ordered dozens of media organizations closed down, according to a decision printed in the Official Gazette. They included 45 newspapers, 16 television stations, 23 radio stations, three news agencies and 15 magazines. The list comprised many regional media outlets as well as several Gulen-linked media that had already been seized by the state.
Earlier, authorities issued warrants for the detention of 47 former executives or senior journalists of Turkey's Zaman newspaper for alleged links to Gulen, who denies any involvement in the coup attempt. Such detentions have raised concerns that people could be targeted simply for criticizing the government.
The media watchdog Reporters Without Borders condemned Turkey's purges of journalists, saying they have assumed "increasingly alarming proportions."
"Criticizing the government and working for media outlets that support the Gulen Movement do not constitute evidence of involvement in the failed coup," said Johann Bihr, who heads the organization's Eastern Europe and Central Asia desk.
Turkey's Justice Ministry denied an Amnesty International report alleging that some of those detained were tortured. Correct arrest and custody procedures were being applied under a three-month state of emergency announced last week, it said.
Reflecting tension with allies, Turkey has complained of a lack of strong support from European nations and the United States for the government's sweeping efforts to weed out suspected plotters and Gulen's supporters.
"Until now, we have not received the backing and the statements that we, the whole of Turkey, expect from these countries," said Energy Minister Berat Albayrak, who is also Erdogan's son-in-law.
A linchpin of Turkey's former appeal was its now-moribund bid to join the European Union, and Turkish rhetoric described the country as a bridge between the West and Muslim countries. Turkey even sought to facilitate talks between archenemies Israel and Syria, though that effort collapsed after Israel's 2008-2009 Gaza war.
"Turkey was a shining star in the region. It was a country whose word was listened to," Kemal Kilicdaroglu, Turkey's main opposition leader, said in an interview with The Associated Press on Tuesday.
However, "this has been lost to a great extent" because Turkey "intervened in the internal affairs of other countries," Kilicdaroglu said.
At the time, Turkey's leaders said they had to adjust their policy of diplomatic outreach, dubbed "zero problems with neighbors," because of rapidly unfolding, historic change.
Erdogan supported the revolt against Egypt's Hosni Mubarak in 2011, but has frosty ties with military rulers who toppled Islamist leader Mohammed Morsi in 2013. Also in 2011, the Turkish leader backed NATO air strikes in Libya, which descended into more chaos after Libyan dictator Moammar Gadhafi's death.
Erdogan previously vacationed with Syrian President Bashar Assad, but demanded his ouster as the conflict intensified there. Today, after allegedly tolerating a flow of weapons and fighters to Syrian rebel groups, Turkey hosts 3 million Syrian refugees. It has suffered extremist bombings after backing the U.S.-led campaign against the Islamic State group, and attacks from Kurdish separatists.
Although Turkey has couched foreign policy in terms of human rights, detractors claim Erdogan, a Sunni Muslim, was leaning toward a sectarian position in various conflicts and using language seen as critical of Shiite Muslims in Iraq and elsewhere.
Internally, the coup attempt by suspected supporters of Gulen exposed deep tensions in Turkey, fueled partly by concern that the president is pushing toward autocratic rule. While Erdogan has presided over the ruling party's extraordinary electoral success since 2002, he has also alienated secular Turks who believe he wants to impose an Islamic lifestyle.
A police crackdown on demonstrations in 2013 that began as a protest against the urban development of Istanbul's Gezi Park killed a dozen people and undermined Turkey's credentials as a stable democracy.
Turkey's robust economic growth during Erdogan's early years in power was the envy of the region, but Standard & Poor's recently downgraded its credit rating for Turkey deeper into "junk" status, citing the failed coup and political turmoil. Erdogan said there were no "justified reasons" for the downgrade, declaring: "Our economic indicators are so much better than most countries in the world."
However, Dani Rodrik, an economist at Harvard's Kennedy School of Government, suggested in an email to The Associated Press that Erdogan's recent overtures to Russia and Israel were "flip-flops" that reflected worries about the Turkish economy and efforts to revive business.
Turkonfed, a non-governmental group that represents Turkish businesses, welcomed a recent meeting in which Erdogan and two opposition leaders discussed national unity.
Tarkan Kadooglu, president of the business group, said: "The society is in need of a political language that is uniting, not one that is polarizing."