Russia and Turkey took a big step towards normalising relations on Tuesday, with their leaders announcing an acceleration in trade and energy ties at a time when both countries have troubled economies and strains with the West.
President Vladimir Putin received his Turkish counterpart Tayyip Erdogan in a Tsarist-era palace outside his home city of St Petersburg. It was Erdogan's first foreign trip since last month's failed military coup, which left Turkey's relationship with the United States and Europe badly damaged.
The visit is being closely watched in the West, where some fear both men, powerful leaders ill-disposed to dissent, might use their rapprochement to exert pressure on Washington and the European Union and stir tensions within NATO, the military alliance of which Turkey is a member.
Putin said Moscow would gradually phase out sanctions against Ankara, imposed after the Turks shot down a Russian fighter jet near the Syrian border nine months ago, and that bringing ties to their pre-crisis level was the priority.
"Do we want a full-spectrum restoration of relations? Yes and we will achieve that," Putin told a joint news conference after an initial round of talks. "Life changes quickly."
Cooperation would be increased on projects including a planned $20 billion gas pipeline and a nuclear power plant to be built in Turkey by the Russians, Erdogan said, as well as between their two defence sectors.
"God willing, with these steps the Moscow-Ankara axis will again be a line of trust and friendship," Erdogan said.
The leaders were to discuss the war in Syria, over which they remain deeply divided, in a subsequent closed-door session. Progress there is likely to be more halting, with Moscow backing President Bashar al-Assad and Ankara wanting him out of power.
Turkey has been incensed by what it sees as Western concern over a post-coup crackdown but indifference to the bloody putsch itself, in which rogue soldiers bombed parliament and seized bridges with tanks and helicopters. More than 240 people were killed, many of them civilians.
Putin's rapid phone call expressing his solidarity to Erdogan in the wake of the failed putsch had been a "psychological boost", the Turkish president said.
Turkish officials, by contrast, warned on Tuesday of rising anti-American sentiment and of risks to a crucial migrant deal with Europe, in a sign of deteriorating relations.
Erdogan blames Fethullah Gulen, a Muslim cleric who has lived in self-imposed exile in the U.S. state of Pennsylvania since 1999, and his followers for the failed coup.
In Moscow he also implied that Gulenists in the military may have been responsible for the downing of the jet, telling a Turkish-Russian business council that they had "clearly taken aim at ties between our countries", although he stopped short of blaming them outright.
Turkey has launched a series of mass purges of suspected Gulen supporters in its armed forces, other state institutions, universities, schools and the media, prompting Western worries for the stability of the NATO ally.
Denmark's ruling party said on Tuesday the EU should end accession negotiations with Turkey completely over Erdogan's "undemocratic initiatives", the latest European country to condemn developments in Turkey.
Justice Minister Bekir Bozdag said hostility towards the United States was rising among Turks and could be calmed only by the extradition of Gulen, who denies any involvement in the coup and has condemned it.
"There is a serious anti-American feeling in Turkey, and this is turning into hatred," Bozdag said in an interview with state-run Anadolu Agency, broadcast live on Turkish television channels. "It is in the hands of the United States to stop this anti-American feeling leading to hatred."
In Washington, the U.S. State Department criticised charges in the Turkish press that a Washington think tank had been behind the coup attempt.
"This sort of conspiracy theory, inflammatory rhetoric is absolutely not helpful," State Department spokeswoman Elizabeth Trudeau said. "We have certainly spoken to our Turkish counterparts on unhelpful rhetoric."
Despite the timing of the Russia visit, Ankara has insisted that Erdogan's meeting with Putin is not meant to signal a fundamental shift in Turkish foreign policy.
Turkey hosts American troops and warplanes at its Incirlik Air Base, an important staging area for the U.S.-led fight against Islamic State militants in neighbouring Iraq and Syria.
German Foreign Minister Frank-Walter Steinmeier told the Bild daily that he was not worried about Russia and Turkey improving ties.
"I do not believe that relations between the two countries will become so close that Russia can offer Turkey an alternative to the NATO security partnership," he said.
NUCLEAR AND ENERGY DEALS
Putin told Erdogan that he hoped Ankara could fully restore order after the failed coup, saying Moscow always opposed unconstitutional actions.
"I want to express the hope that under your leadership the Turkish people will cope with this problem and that order and constitutional legality will be restored," he said.
Erdogan's meeting with Putin was only his second with a foreign head of state since the coup, following a visit to Ankara by the Kazakh president on Friday. Turkish officials have questioned why no Western leader has come to show solidarity.
Turkey and Russia would reinstate their annual bilateral trade target of $100 billion, Erdogan said, which had been abandoned after Russia imposed the sanctions.
Tourism revenue, a mainstay of the Turkish economy, has been hit hard by an 87 percent dive in Russian visitors in the first six months of the year.
Putin said the question of resuming Russian charter flights to Turkey, halted under the sanctions, would be solved in the near future.
The two leaders said also agreed to revive the gas pipeline project, known as TurkStream, meant to be supply Turkey with additional volumes of Russian gas and increase deliveries to Europe in the future.
Russia has been mulling a number of projects to supply Europe with gas bypassing Ukraine, but the EU has opposed most of them, eager to cut its reliance on gas from Moscow.
Russian Energy Minister Alexander Novak said the first line of TurkStream to supply Turkey could be built as early as 2019 but that solid European guarantees were needed before a second line from Russia to the EU across Turkey could be built.
Stalled Russian work on the Akkuyu nuclear power plant in Turkey would also be restarted, the two leaders said. In 2013, Rosatom won a $20 billion contract to build four reactors in what was to become Turkey's first nuclear plant, but construction was halted after the downing of the jet.