Turkey and Russia have reached a clear consensus on mormalising ties, said an official in Turkish President Tayyip Erdogan's office after a meeting between the Turkish leader and his Russian counterpart Vladimir Putin. 

"The general mood has been very positive," the official said following the meeting in St. Petersburg. "Both sides are determined to take relations forward."

It was the first meeting between Putin and Erdogan since Turkey shot down a Russian fighter jet last November, sparking a deep diplomatic crisis. 

Erdogan's visit to Putin's hometown of St Petersburg on Tuesday was also his first foreign trip since a failed coup attempt last month that sparked a purge of alleged coup supporters in the military, judiciary, civil service and education sector, and cast a shadow over Turkey's relations with the West.

OPINION: What's behind the Turkey-Russia reset?

"Your visit today, despite a very difficult situation regarding domestic politics, indicates that we all want to restart dialogue and restore relations between Russia and Turkey," Putin said as the two met.

Erdogan said that Turkey was entering a "very different period" in relations with Russia, and that solidarity between the two countries would help the resolution of regional problems.

Erdogan also thanked his Russian counterpart for a telephone call after the failed coup attempt on July 15, saying it "brought our people great happiness".

Russian jet shot down

Al Jazeera's Rory Challands, reporting from St Petersburg, said that "one of the interesting things about the whole spat between Russia and Turkey is how much of it seemed to be driven by the personalities of the two leaders; not actually to do with any of the interests the two countries shared".

"Erdogan has contrasted what Putin did in the aftermath of the attempted coup with the absence of similar moves from Western leaders," Challands reported.

The shooting down of the Russian jet by a Turkish F-16 over the Syrian border last November saw a furious Putin slap economic sanctions on Turkey and launch a blistering war of words with Erdogan that seemed to irrevocably damage burgeoning ties.

"When the Turkish military shot down a Russian fighter jet that it said strayed from Syrian into Turkish airspace last November, Moscow's retaliation was swift," said Al Jazeera's Bernard Smith, reporting from Istanbul.

OPINION: Why Turkey is mending ties with old foes

"Tourist charter flights to Turkey stopped, Russian visitor numbers fell by 87 percent. Turkey's exports to Russia, including food, fell by more than half to $730m in the first six months of this year."

But, in a reversal in late June, Putin accepted a personal expression of regret over the incident from Erdogan as an apology, immediately rolled back a ban on the sale of package holidays to Turkey and signalled Moscow would end measures against food imports and construction firms from the country.

Now, following the failed coup attempt, analysts say ties between the two could deepen - with Erdogan publicly making it clear he feels let down by the United States and the European Union.

"The Russian President was much quicker in his condemnation of the attempted coup than many of Turkey's Western allies and they've [the Western allies] also expressed alarm at the extent of the post-coup crackdown," said Al Jazeera's Smith. "Vladimir Putin hasn't got involved."

Syria was expected to be high on the agenda during the visit. Moscow's military support for Syria's President Bashar al-Assad has been credited for helping to keep him in power. Turkey, though, wants him gone.

Turkey mends ties with Russia and Israel

Source: Al Jazeera and agencies