Following a string of setbacks that has left it increasingly isolated in Europe and the Middle East, Turkey has started a push to repair ties with key neighbors and partners.

Prime Minister Recep Tayyip Erdogan, who met top EU officials in Brussels this week for the first time in five years, is also due to visit neighboring Iran next week. One day before he flies to Tehran, on Jan. 28, Erdogan will host French President Francois Hollande, whose country has been one of the actors slowing down Turkey’ process of joining the EU.

It’s a significant about-face for a government that in recent years has sought to portray Turkey as the rising heavyweight in the region, flush with investment money and content to turn away from the floundering EU. But the Arab Spring and its ongoing fallout in Egypt, along with the spiraling crisis in Syria, both combined to catch Erdogan off guard and significantly diminished his influence on Europe and the Middle East.

When Erdogan’s Foreign Minister, Ahmet Davutoglu, assumed office in 2009, he formulated a “zero problems” doctrine with the aim of creating an area of peace, stability and rich export markets around Turkey. At the time, Turkey was spurred by rapid economic growth, inspired by its history as the heir to the Ottoman Empire that ruled the Middle East for centuries, and buoyed by a sense that the country—as a Western-style democracy with a Muslim population—could be a model for the region, projecting its “soft power” through diplomacy, trade and popular culture like TV soaps.

But that policy has failed resoundingly. “Today, Turkey does not even have ambassadors in Egypt, Israel and Syria, three important countries in the region,” columnist Murat Yadkin wrote in the Radikal newspaper this week.

When the Arab Spring swept across Tunisia and Egypt three years ago this January, the Erdogan government declared that Turkey would cut ties with dictators and encourage democracy. That approach quickly took on a sectarian bent, with the predominantly Sunni Turkey seeking close relationships with groups like Hamas and the Muslim Brotherhood, whose power seemed in the ascendant after the downfall of Hosni Mubarak. Erdogan’s government also declared itself an early backer of the Syrian uprising, giving safe haven to the mostly Sunni rebels seeking to oust President Bashar al-Assad and his ruling Alawite sect, an offshoot of Shiite Islam.

But as fortunes have shifted in Cairo and on the ground in Syria, Turkey has found itself on what—at the moment at least—seems to be the losing side of the region’s power struggles. Erdogan’s support of Syria’s rebels—who are now plagued by infighting between moderates and Islamists and among the various jihadist groups inside the country—has pitted Turkey against Assad’s most important financial backer, Iran, along with its allies in the Shiite-led governments in Iraq and Lebanon. (Ties with Iraq have also been soured by disputes over oil trade and the Syrian conflict.) Moreover, after Egypt’s generals ousted the Muslim Brotherhood-backed President Mohamed Morsi last summer, Erdogan angered the country’s new military rulers by demanding Morsi’s reinstatement.

Even Turkey’s relations with its former ally Israel are in a deep freeze, despite an apology by Israel for the death of nine Turkish activists during an Israeli commando raid on a Turkish ship bound for the Gaza Strip in 2010.

At the same time, Turkey’s long-standing drive to become a member of the EU ground to a halt as Ankara lost the reform momentum it had showed in the early 2000s and as resistance within the bloc to admit a big Muslim country grew. In Brussels this week, Erdogan insisted that Turkey remained committed to EU membership and called for swifter talks about the issue.

Ankara admitted that Turkey had distanced itself from its partners, but until recently insisted that there was nothing wrong with its basic approach. Ibrahim Kalin, and advisor to Erdogan, spoke of a “meritorious isolation” of the country.

An annual poll organized by the Turkey Economic and Social Studies Foundation (Tesev), a respected non-government think tank in Istanbul, found last month that favorable views of Turkey in the region fell from 78 percent in 2011 to 59 percent in 2013. Even China is more popular than Turkey in today’s Middle East.

That development has caused alarm in Ankara. President Abdullah Gul, a former foreign minister under Erdogan, used a speech during a conference of Turkish diplomats last week to deliver a thinly veiled criticism of Davutoglu’s work. He called on the government to “re-calibrate” its Syria policy and suggested that Ankara had misread developments in the region as a whole.

“The main task of diplomacy is to solve the most important problems,” the president said, according to a transcript of the speech posted on his office’s website. “But the first stage of any solution is to have correct findings and a realistic diagnosis. The key to solving problems, whether domestic or foreign, is common sense, a sensible approach, dialogue and an empathy that makes sure you understand your interlocutor.”

Even though the government denies that there is any need for a foreign policy re-set, scheduled visits by foreign leaders in Ankara and trips by Turkish politicians to countries in the region are an indication that the “re-calibration” demanded by Gul is underway.

Ankara should strive for a more realistic and less confrontational stance, said Gokturk Tuysuzoglu, a political scientist at Giresun University on Turkey’s Black Sea Coast.

“Turkey’s foreign policy strategy has entered a dead-end street, and a correction has become a must,” Tuysuzoglu said. Ankara should abandon its concentration on Sunni Islam groups like Hamas and the Muslim Brotherhood and establish “sound contacts” with all players, he said, including Egypt’s new government, the Shia leaders of Iraq, the Syrian Kurds, Iran, the Hamas rival El Fatah in Palestine and also Israel.

Tuysuzoglu also said Turkey should repair ties with the EU, which suffered after Erdogan’s crackdown on peaceful protesters last summer and his purge of suspected anti-government officials in the police and the judiciary following the recent corruption accusations against his government.

But change will not be easy because the Erdogan government has invested a considerable amount of political capital in its policies. Tuysuzoglu, the political scientist, added that Erdogan’s religiously conservative voter base poses a significant problem to organizing a foreign-policy turnaround. Many Turks are supportive of Erdogan’s ambition of regional leadership as well as his strong pro-Sunni and anti-Israeli policies. “The government is stuck between [strategic] necessities and its social/political aims,” he said.

The most recent headache for the Turkish government: Erdogan stands accused of supplying weapons to Sunni rebel groups despite an official policy of limiting support for Assad’s foes to non-military means.

Since the start of the new year, Turkish prosecutors have stopped more than half a dozen trucks under the suspicion that they were carrying weapons for Syrian rebels. All of the trucks turned out to be operated by Turkey’s intelligence service MIT. The agency, backed up by Erdogan, refuses to discuss the nature of the cargo.

“The MIT is smuggling weapons as a routine,” opposition lawmaker Ertugrul Kürkcü said. “Nobody should wonder why Turkey is not at peace with its neighbors.”