In a few short years, Turkey has gone from a regional pillar of stability to a rattled nation fighting battles on three separate fronts.
Turkey has pushed hard for the ouster of Syrian President Bashar Assad. Its security forces are again clashing with Kurdish separatists in the southeast of the country. And Turkish leaders suspect the Islamic State is behind Tuesday's terrorist attack at the Istanbul airport.
All this turmoil has unsettled Turkey, where the powerful security forces have historically been given wide latitude to impose order. Yet the country that sees itself as a regional leader has lurched from one fight to another inconclusively. All three are draining its influence, sapping the economy and driving away tourists.
President Recep Tayyip Erdogan, who has been in power since 2003, once declared that Turkey's foreign policy was based on "zero problems with neighbors." Almost everything that has happened in recent years has made a mockery of that claim.
The Turkish leader was an early advocate for ousting Assad after Syria's civil war erupted in 2011. And in the past year, Erdogan has emphasized the renewed fight against Kurdish separatists at home.
He was paying less attention to the Islamic State, or ISIS, but that may change now that the extremist group has been blamed for several major attacks inside Turkey over the past year.
"Critics say Turkey has been too focused on the Kurds and not enough on ISIS and I think what we'll be seeing now is whether this latest deadly attack results in any kind of shift in their focus," Peter Kenyon, NPR's Istanbul correspondent, told Morning Edition.
And don't forget, Turkey is sheltering 2.7 million of the 4.8 million Syrian refugees who have fled their homeland since the war. All this adds up to a major mess for Turkey, with no end in sight. Here's a look at the status of all three conflicts.
Turkey vs. Assad
It seems like long ago, but Turkey's Erdogan and Syria's Assad used to be allies. They split over the Syrian war, and Erdogan has been leading the call for Assad to go.
Turkey hasn't sent its own troops to Syria but was allowing fighters from all over the world to transit its territory on their way to fight Assad in Syria.
"Originally, Turkey did encourage people to come and fight against Bashar Assad's regime," Henri Barkey of the Woodrow Wilson International Center told NPR.
But, he added, "the opposition that emerged against Assad proved incapable of taking Assad down. So in its frustration, [Turkey] allowed a large number of Islamists to cross because the Islamists, the jihadists, were much better fighters than the traditional, secular Syrian fighters."
It hasn't worked. Assad remains entrenched after five years of war. Turkey's efforts have been further undermined by Russia's stepped-up support for the Syrian leader, including an air campaign that has bolstered the sagging Syrian army.
Turkey vs. the Islamic State
Many of the jihadists who passed through Turkey ultimately joined the Islamic State. But instead of bringing down Assad, they contributed to the rapid rise of the world's most dangerous extremist group, one that fights in Syria and Iraq and now carries out terrorist attacks farther afield.
In addition, Turkey's open-door policy for Islamists created friction with the United States and other NATO countries, which wanted Turkey to clamp down on its border and devote much more energy to battling the Islamic State.
As ISIS made spectacular territorial gains in Syria and Iraq in 2014, fighters, money and weapons flowed to the group, while those resources dried up for more moderate forces, such as the Free Syrian Army.
Turkey has become more active in supporting the U.S. and its coalition partners against ISIS, though the relations can still be bumpy.
Turkey is working with the U.S. to cut off key border routes used by ISIS to move men and supplies from Turkey to Syria. Turkey now allows U.S. fighter jets to use Incirlik Air Base for bombing runs against ISIS. The Turkish air force has flown missions as well.
But Turkey's actions against ISIS have generated a backlash from the group, which has no trouble infiltrating Turkey. ISIS has been blamed for four terrorist attacks inside Turkey over the past year. That's not counting Tuesday's airport slaughter, where Turkey suspects ISIS, though no one has claimed responsibility.
Turkey vs. the Kurds
This was a regional bright spot back in 2012, when Turkey and the Kurdish separatists ended more than three decades of fighting in southeast Turkey. But it all unraveled a year ago and the Turkish security forces have resumed operations against the Kurdistan Worker's Party, or PKK.
No Turkish leader has completely defeated the PKK, yet Erdogan insists this time the PKK will be eradicated as a threat.
Erdogan also says Syrian Kurdish fighters are a terrorist group every bit as dangerous as the PKK in Turkey. But the U.S. draws a sharp distinction. The U.S. sides with Turkey in declaring the PKK a terrorist group but supports the Syrian Kurdish fighters, known as the YPG, who have been effective fighters.
Where the U.S. sees the Kurds delivering a blow to the Islamic State, Turkey sees an emerging threat from another armed Kurdish group.
"This has greatly complicated the effort to fight ISIS in northern Syria," Kenyon noted.
You won’t find a paywall here. Come as often as you like — we’re not counting. You’ve found a like-minded tribe that cherishes what a free press stands for. If you can spend another couple of minutes making a pledge of as little as $5, you’ll feel like a superhero defending democracy for less than the cost of a month of Netflix.