Syria's embattled President Bashar al-Assad travelled to Moscow for his first foreign trip since the conflict broke out in his country in 2011, holding key talks on the crisis with President Vladimir Putin.
Assad, who last visited Russia in 2008, used the surprise visit on Tuesday evening to thank Putin for launching a campaign of air strikes in Syria last month, with the two leaders agreeing that military operations must be followed by political steps.
Putin pledged to continue to support Damascus militarily, while calling for a political solution involving all groups to try to end the war, the Kremlin said on Wednesday.
Assad's talks with one of his only allies came on the same day the United Nations said that tens of thousands of people had fled new regime offensives in Syria near the second city of Aleppo.
Assad told Putin that the Russian air bombardments launched on September 30 -- which have caused concern in the West -- had helped stop the spread of "terrorism" in his country, the Kremlin said.
The strikes are reported to have killed 370 people so far, including more than 120 civilians, according to a monitoring group.
Russia insists its air campaign is intended to target the extremist ISIS group and others it describes as "terrorists".
But rebels and the West accuse Moscow of seeking to prop up Assad and of striking moderate and Islamist opposition forces rather than just jihadists.
Putin's spokesman Dmitry Peskov described Assad's lightning trip as a "working visit" at the invitation of the Kremlin, and by Wednesday morning, Assad was back in Damascus, the Syrian presidency told AFP.
It appears the Kremlin waited for the Syrian leader to return home before breaking the news of the visit.
Peskov declined to say whether the talks, which also saw the two leaders and their entourages dine together, brought any firm results.
Putin said Russia was ready to do everything it could to help secure peace in Syria, where the conflict first erupted as a peaceful uprising against the regime in March 2011.
Since then, more than 250,000 people have been killed and millions forced from their homes, sparking a mass migration of refugees that has raised tensions in Europe.
"We are ready to make our contribution not only during armed hostilities in the fight against terrorism but also during a political process," Putin told Assad.
The Syrian leader also stressed the importance of "further political steps," according to the Kremlin statement.
"I need to say that the political steps which Russia has taken since the start of the crisis prevented the events in Syria from developing along a more tragic scenario," Assad said.
"Terrorism which has now spread through the region would have consumed much larger areas and would have spread throughout much more territory if it were not for your actions and your decisions," he said in comments translated into Russian.
Putin said it was the Syrian people who should decide the fate of their country, a thinly veiled jab at the United States which has long insisted that Assad should go before there can be any peaceful settlement.
"At the end of the day a long-term settlement can be achieved on the basis of a political process with the participation of all political forces, ethnic and religious groups," the Kremlin strongman said.
"And ultimately, the final word no doubt should rest solely with the Syrian people."
Russian Defence Minister Sergei Shoigu, the head of Russia's Foreign Intelligence Service, Mikhail Fradkov and Nikolai Patrushev, chief of Russia's security council, all took part in the talks.
With the Russian bombing campaign now in its fourth week, Moscow and Washington announced on Tuesday they had agreed measures to reduce the risk of a confrontation between Russian warplanes and others from a US-led coalition bombing Syria.
"There's a series of protocols in place that effectively are intended to avoid any sort of risk of a mid-air incident between our air crews and Russian air crews," Pentagon spokesman Peter Cook said.
Russia has carried out more than 500 air raids in support of Assad, which the Britain-based Syrian Observatory for Human Rights said had killed more than 370 people.
Dozens were also wounded Monday, in some of the deadliest raids yet, and the commander of a moderate rebel brigade was among the dead, the Observatory said.
Iran, a key Assad ally, has reportedly sent hundreds of troops to fight alongside his forces.
The UN Office for the Coordination of Humanitarian Affairs said Tuesday that around 35,000 people were reported to have been displaced from the the southwestern outskirts of Aleppo, following government offensives.
Aleppo, once Syria's commercial hub, has been a key focus of the fighting and since 2012, it has been divided between government forces and rebels.
On Friday, government forces began a new offensive south of the city, attacking areas near the strategic highway to Damascus.