In recent weeks, Ankara has helped save the grain export deal after Russia abruptly pulled out of the deal, threatening global food supplies. After four days of telephone diplomacy between President Recep Tayyip Erdogan and Russia’s Vladimir Putin, as well as other officials from both sides, Moscow announced on November 2 that it was rejoining the pact originally brokered between Turkey and the United Nations in July . “He [Putin] does not agree to open this grain corridor through others. But with me, when I call… he immediately opened the grain corridor,” Erdogan said in an interview with ATV television on the day of Russia’s reversal. Early in the war, Ankara hosted negotiations between Ukrainian and Russian officials in Istanbul and Antalya. And on Monday, the heads of US and Russian foreign intelligence services – Bill Burns of the CIA and Sergey Nariskin of the SVR – met in Ankara to discuss “threats to international security, starting with the use of nuclear weapons”, the office said of Erdogan. Russian President Vladimir Putin and Turkish President Recep Tayyip Erdogan [File: Sputnik/Alexander Demyanchuk/Pool via Reuters] Since February 24, Ankara has carefully balanced relations with both sides of the war. Turkey has supplied Ukraine with vital weapons, such as the much-hyped Bayraktar drones, but also equipment including armored Kirpi troops and body armor. Last month the first of four Ada-class corvettes built for Ukraine was launched at an Istanbul shipyard. As the guardian of the entrance to the Black Sea, Turkey closed its straits to military vessels within days of the start of the war, preventing Moscow from strengthening its fleet. Meanwhile, Erdogan maintains regular contact with Putin and, in line with Turkey’s policy of only pursuing sanctions approved by the UN Security Council, has maintained economic ties as the West turned its back on Russia. Trade between the Black Sea neighbors has boomed over the past nine months. Turkey’s exports to Russia rose 86 percent last month to $1.15 billion, while imports from Russia more than doubled to $5.03 billion, according to official Turkish data. Sun-seeking Russians – as well as yacht-owning oligarchs – have flocked to Turkey’s beaches this year, with 3.8 million arriving in the first nine months, the second largest national group after the Germans. Valeria Harmash, a Ukrainian living in Istanbul, says it is painful to see Russians “living as if they don’t care” about the war, while in Turkey [Andy Wilks/Al Jazeera] For Ukrainians in Turkey, however, sharing Istanbul’s shops and restaurants with Russian tourists and surfers has added salt to the wound. “It’s very difficult because they started the war and then they leave Russia and enjoy their lives in places like Turkey,” said Valeria Harmash, a 28-year-old from Kharkiv, whose brother and uncle are on the front lines. “It’s very painful for me – their people, their president destroyed the lives of my family and friends, but I see Russians in Zara, Starbucks and Mango living like they don’t care. I can see it on their faces when they see my sign in Ukraine that they don’t feel any regret.” Tourism and other foreign earnings have proved vital as Erdogan faces Turkey’s worst economic crisis of his 20-year rule and a difficult election next year. Access to Russian energy means that Turkey does not face the same level of price increases seen elsewhere in Europe. Natural gas from Russia met 45 percent of Turkey’s needs last year, and Ankara has reportedly asked for its payments to be postponed until 2024. Meanwhile, Putin has floated the idea of making Turkey a hub for selling Russian gas to the European market. Large sums of mostly untraceable foreign currency have also flowed into Turkey – $24.9 billion between January and September, according to central bank data released on Friday, more than double the same period in 2021 – and helped prop up the widening deficit of its current transactions. “I think it is now beyond reasonable doubt that these … inflows are primarily Russian money flows, with Putin firmly sticking his colors to Erdogan’s web to ensure his re-election,” said Timothy Ash, fellow at Chatham House’s Russia and Eurasia. program. The Central Bank did not respond to Al Jazeera’s request for comment at the time of publication. But in an interview with the Financial Times last month, Finance Minister Noureddine Nebati said tourism revenue was a significant part of unaccounted income, as Russians use cash because sanctions have shut them out of the financial system. He said all the funds were legitimate, even though the origin of such cash deposits is impossible to trace. Mithat Rende, a former Turkish ambassador to Qatar with expertise in energy negotiations, described Putin’s gas hub proposal as an attempt to “drive a wedge between Turkey and the West and also upset the solidarity between European countries.” Questions have been raised about the viability of such a hub, given Europe’s desire to wean itself off Russian gas and the additional infrastructure required. “If Putin wants to make a gesture to Turkey or to his friend the president, it is not by declaring his willingness to make Turkey an energy hub. It is to postpone it [gas] payments,” Rende added. Ozgur Unluhisarcikli, director of the German Marshall Fund in Ankara, pointed to the reported arrival of Russian capital as a factor in Erdogan’s recent rally at the polls. “Compared to last June, all major polls show that Erdogan has consolidated his supporters,” he said. “I think this is more due to capital inflows to Turkey during the summer. It was a very good tourist season. Russian money came to Turkey and unemployment decreased a little and the currency more or less stabilized.” Erdogan’s role in the grain deal – Putin hailed him as a champion of the world’s poorest countries as he returned to the accord – has undoubtedly raised the Turkish president’s international standing as he has steadily sought to mediate between the warring sides. And Russia, which has deepened ties with countries such as China, India and Turkey as it has been frozen out by the West, is increasingly relying on Ankara as a window to the Western world – a position that has raised concerns about its collapse of sanctions in Washington. Turkey’s war gains are also seen in its relationship with its NATO allies and the West in general. Efforts by Sweden and Finland to join the Atlantic alliance have been blocked by Turkey as it seeks concessions from the Nordic states, demanding a crackdown on what it considers “terrorists” taking refuge in the two countries. The new Swedish government has signaled its changing position on the Kurdish-Syrian YPG, due to the group’s ties to Kurdish rebels who have fought the Turkish state for the past 38 years. Although Washington has denied being linked to NATO’s Nordic expansion, Ankara is moving closer to reaching an agreement with the US to update its fleet of F-16 fighter jets. Erdogan’s balanced approach has been generally well received by the public in Turkey. “It is right not to get too closely involved in this war,” said Omer Avci, a shopkeeper in Istanbul. “The Russian occupation is terrible, but President Erdogan is the one working for peace, while the West does nothing. We need peace in the region both for us and for the world.”