For the next few minutes, we're going to focus on Turkey as it struggles to deal with turmoil in its neighborhood. It shares borders with Iraq, Iran and Syria, among other countries. And just a few years ago, its leaders were confidently predicting the country's resurgence as a regional powerhouse. But today, Turkey is scrambling to remake its foreign policy and its image. Critics say it's become too sectarian and that it's ignoring the threat posed by the Sunni Muslim extremists who cross its borders to fight in Syria.

More on that in a few minutes but, first, NPR's Peter Kenyon reports on Turkey's foreign policy reset.

PETER KENYON, BYLINE: For the last few years, Turkey's foundation for economic and social studies has polled 16 Mid-East countries on a variety of subjects, including their views on Turkey. After receiving soaring approval ratings of 80 to 90 percent a few years ago, this year, positive views of Turkey all but disappeared in countries such as Egypt and Syria.

In the case of Syria, Turkey has far more to worry about than plummeting popularity. And recently, Ankara has begun to react.

SOLI OZEL: Ankara-Syria policy is basically a number of attempts to get the country out of the hole that it has dug itself in.

KENYON: Soli Ozel, foreign editor at Haber Turk newspaper, isn't surprised to see state media trumpeting the recent deportation of 1,100 alleged Jihadi fighters from Turkey. After years of maintaining essentially an open-border policy for opposition fighters, including extreme Islamist units, Ozel says Ankara is finally recognizing the threats to its own security posed by the extreme version of Islam preached by some of these groups.

In its defense, Turkey has said Western powers thrust it front and center in the campaign to confront Syrian President Bashar Al-Assad, and then pulled the rug out from under it by failing to intervene. Ozel doesn't buy that argument.

That defies credulity. I mean, it's not as if Turkey wasn't over-enthusiastic to play the lead role in whatever was going to happen in Syria. And I think this over-enthusiasm is what actually did it in. Turkey actually exposed itself, in the sense that it showed to the world a huge gap between its aspirations and its capacities.

Without admitting any missteps, Ankara is showing signs of returning to previous foreign policy approaches. Talks with the European Union have been revived and friendly overtures have resumed with another of Turkey's controversial neighbors, Iran. Ankara and Tehran recently issued a joint call for an immediate cease-fire in Syria. And in the wake of an interim nuclear agreement, Iran is targeting energy-hungry Turkey as a likely candidate for increased trade.

Analyst Jayson Browder, at Bayburt University in eastern Turkey, says while Prime Minister Recep Tayyip Erdogan may have burned his bridges with President Assad, he can still recover somewhat by working with Syria's ally, Iran.

JAYSON BROWDER: I think the way that Prime Minister Erdogan is going to stay relevant is a partnership with Iran. Sectarian violence in Syria poses a great threat and I think Iran and Turkey both see this as probably the most serious threat to regional stability.

KENYON: Analyst Soli Ozel also sees Ankara making a strategic pivot toward Tehran, but says it's unlikely to be more than a temporary alignment of interests.

OZEL: I mean, unlike Saudi Arabia and Israel, Turkey does not have a visceral hatred or feeling of an existential threat from Iran. These two countries haven't fought one another for the last 400 years. Although they're not necessarily the most intimate of friends, they dance intimately, holding a dagger in their hands which is dipped in poison, naturally.

KENYON: Turks say their country's fall off the pedestal of regional admiration has had at least one welcome result - the catchy but inaccurate phrase neo-ottoman, and the even worse Otto-mania, are no longer popular shorthand for describing Ankara's longing for its lost empire. For now, Turkey's shifting foreign policy seems to defy easy summing up.