Syria’s President Bashar al-Assad has visited Moscow on his first overseas trip since the civil war broke out in his country in 2011.
During the surprise visit, he had talks with President Vladimir Putin.
Russia launched air strikes in Syria last month against the so-called Islamic State (IS) and other militant groups battling Mr Assad’s forces.
Mr Assad said Russia’s involvement had stopped “terrorism” becoming “more widespread and harmful” in Syria.
For his part, Mr Putin said Moscow’s hope, in providing a “positive dynamic in the fighting”, was that a “long term resolution can be achieved on the basis of a political process with the participation of all political forces, ethnic and religious groups”.
The visit happened on Tuesday evening, but was not announced until Wednesday – after Mr Assad had returned to Damascus.
The BBC’s Steve Rosenberg in Moscow says this was a short visit but by hosting the Syrian leader, President Putin’s message to the West was clear – that Moscow is a key player in the Middle East, and that there can be no solution to the Syrian conflict without Russia’s involvement.
In comments that were videoed and published by the Kremlin, Mr Putin thanked Mr Assad for coming despite the “dramatic situation” back home.
He praised the Syrian people for “almost alone… resisting, fighting international terrorism for several years. They had suffered serious losses, but recently have been achieving serious results in this fight,” he added.
Mr Putin said Russia was also concerned by the 4,000 people from the former Soviet Union believed to be fighting in Syria. “We cannot permit them – once they get fighting experience there and ideological training – to turn up here in Russia,” he said.
Mr Assad thanked Russia for “standing up for the unity of Syria and its independence”, and said its intervention had “prevented the events in Syria from developing along a more tragic scenario”.
Terrorism is a “real obstacle to a political solution,” said Mr Assad, “and of course the whole (Syrian) people want to take part in deciding the fate of their state, and not just the leadership.”
Russia launched air strikes in Syria on 30 September, saying they were hitting IS positions – which are also being targeted by US-led strikes.
Western countries and Syrian activists say Russian planes have been hitting non-IS targets, a claim Moscow denies.
The US and Russia agreed a deal on Tuesday to ensure their air forces do not clash in the skies over Syria, after Washington said last week their planes had “entered the same battle space” and came within miles of each other.
In the wake of Mr Assad’s visit, the Kremlin announced that Mr Putin had spoken by telephone with Turkish President Recep Tayyip Erdogan and Saudi King Salman.
In further Syria-related diplomacy, Russian media also reported that US Secretary of State John Kerry would meet his Russian counterpart Sergei Lavrov in Vienna on Friday, and that the Turkish and Saudi foreign ministers would join them.