“We came from a policy of having zero problems with our neighbors, and now we’re having problems with almost everyone,” said Umit Pamir, a retired diplomat who served as Turkey’s ambassador to the United Nations, the North Atlantic Treaty Organization, and Greece.

Turkey’s relations with regional powerhouses Egypt and Israel are so bad that Ankara doesn’t have ambassadors in either country. Its insistence on regime change in Syria means chilly ties with Iran. The Shiite-led government in Baghdad is wary of Turkey’s reach into Iraqi Kurdistan, while Saudi Arabia and other Gulf monarchies are upset with Turkey’s support for the Muslim Brotherhood’s designs on the region. Even maverick Qatar, which used to enable Turkey’s foreign-policy ambitions, has moved closer to the rest of the Gulf.

Instead of becoming a leader showing the Middle East the way to democracy and prosperity, Turkey is struggling to cope with the spillover of the region’s problems—from Islamist militancy to sectarian strife to deadly street violence.