Recep Tayyip Erdogan has pulled off a quick political turnaround, taking a big step toward thawing relations with the West as he seeks solutions to a long-lasting and deep economic crisis.
He stunned NATO allies when he suddenly dropped a long-standing blockade of Sweden's bid for membership in the military alliance early last week.
Just hours before arriving in Lithuania, he blasted the Swedish government for, he said, not doing enough to stop terrorism.
In a sudden change of stance, the re-elected president of Turkey made clear his desire to improve diplomatic relations with the West and to reassure foreign investors who have been fleeing the country in recent years due to economic problems.
"That's exactly what Erdogan is - out of nowhere he makes a sudden turn in politics and rhetoric.
"Any other politician would suffer the consequences of such a turn, but it benefits him," said Batu Coskun, a political analyst at the Sadik Institute research center in Ankara.
- Why Erdogan's victory in Turkey matters to the West
- Elections in Turkey: Erdogan sang to his supporters after his victory, the country is deeply divided
- "I'm begging for forgiveness": Turkish president in areas affected by devastating earthquake
In exchange for this sudden U-turn, Erdogan received firm promises from Sweden, the US, NATO, and even the European Union (EU).
Turkey is now hoping for the delivery of long-awaited F-16 fighter jets from the United States, and Erdogan says Brussels has expressed "positive" views on continuing Ankara's EU accession process and considering visa liberalization.
The speed with which Erdogan changed his position is interpreted as a clear sign that he is taking a more constructive approach towards allies in the West, who have expressed concern over the decline of democracy in Turkey for years.
There were plenty of photo opportunities at the NATO summit with French President Emmanuel Macron, British Prime Minister Rishi Sunak and German Chancellor Olaf Scholz.
In one of the addresses, American President Joseph Biden highlighted the bilateral meeting with Erdogan, after years of reserved attitude towards the Turkish president.
"I think that after the election, Erdogan feels more confident in his relations with both Russia and the West," says political analyst Batu Choskun.
Confident abroad, but at home he faces the urgent question of recovering a failing economy.
This was precisely his biggest problem in the elections in which he won after a fierce fight in the historic second round of voting at the end of May.
"Business is not going so well," says Burhan Morkoč, a baker who spends 17 hours a day baking bagel-like pastries, known as simit, in a wood-fired oven.
"Everything has become more expensive... people used to buy two, now they buy one. Demand has dropped," he adds.
This is because inflation in the country has been slightly below 40 percent for a long time, which is down from the peak of 85,5 recorded in October 2022.
The lira, the national currency, reached record lows against the US dollar this summer.
While central banks around the world raised interest rates to stop rising prices, Erdogan resisted the move, arguing just the opposite - that higher rates would cause prices to rise.
Instead, he pressured the Central Bank of Turkey to keep borrowing costs low.
Burhan Morkoč and his three brothers run a small bakery in Istanbul's Kadikoj neighborhood.
The rent of the building in this area has increased by 400 percent in the last year and a half, he complains.
In the same period, the prices of other raw materials needed for his business have skyrocketed - wood for the stove has risen in price by 900 percent, flour by almost 500 percent, yeast by 255 percent, and sesame seeds by 150 percent.
To help the economy, Turkey's Finance Minister Mehmet Simsek, a Wall Street veteran whom Erdogan appointed to the post last month, has vowed to resume "rational economic policy."
Together with newly appointed central bank governor Hafiza Gaye Erkan, who also has Wall Street experience, he raised interest rates from 8.5 percent to 15 percent, the first increase in 27 months.
But the baker doubts that politicians understand the urgency of solving the problem for businesses like his.
"Come and spend 18, 20 hours standing here. I sleep for three hours. Let him [Mehmet Šimšek] come to do this. It is easy to sit in an armchair and make decisions. It doesn't work that way," he says.
On his return from the NATO summit in Lithuania, Erdogan focused on his promise to the Turkish population that he would revive the economy and make the country economically successful again.
"Inflation will be in the single digits again," he told reporters on the plane from Lithuania.
Economists say that the recovery of the Turkish economy, which has a deficit of 900 billion dollars, will require time and patience.
"There really isn't a quick, magic cure in sight.
"You have to prioritize and triage," said Murat Gulkan, head of OMG Kapital Advisors, a small investment firm based in Istanbul.
"This implies the introduction of a strict monetary policy, which is politically undesirable," he adds.
Turkey must also regain the confidence of foreign investors.
The current account deficit of the balance of payments in the first five months of this year reached a record 37.7 billion dollars, which means that the value of imports was significantly higher than exports.
Erdogan is not only looking for a solution to this problem in the West.
Next week, he will visit Saudi Arabia, Qatar and the United Arab Emirates.
"We are looking to the West again. Russia is behind us," said economist Iris Čibre.
Erdogan recently angered Russia when he allowed Ukrainian President Volodymyr Zelensky to take home five military commanders who were supposed to stay in Turkey until the end of the war.
The Kremlin even warned Turkey not to look at Europeans through rose-colored glasses.
But Erdogan plans to host Russian President Vladimir Putin in August and hopes to convince Russia to save the Black Sea Agreement which expires next week and which allows Ukraine to export grain.
Analyst Batu Choskun believes that Erdogan is trying to maintain a balance and that he does not want to lose the support of Russia.
"That relationship will not be so easily replaced by the alleged strengthening of relations with the West".
Follow us on Facebook,Twitter i Viber. If you have a topic proposal for us, contact us at bbcnasrpskom@bbc.co.uk
Bonus video: