President Vladimir Putin on Monday ordered the partial withdrawal of Russian troops from Syria, during a surprise visit to the war-torn country.
Putin arrived at Russia's Hmeimim airbase in Latakia province, a government stronghold, where he was welcomed by Syrian President Bashar al-Assad, and the two men were pictured smiling, shaking hands and hugging.
Putin, who announced last week he would be seeking a fourth Kremlin term in a presidential poll in March, said he had ordered Defence Minister Sergei Shoigu to start a partial withdrawal.
"I have taken a decision: a significant part of the Russian troop contingent located in Syria is returning home to Russia," he said in a televised speech to troops at the base.
Russia first intervened in the conflict in 2015, staging air strikes in support of its ally Damascus targeting both the Islamic State group (IS) and other jihadists as well as rebels fighting government troops.
Putin said the troops had helped the Syrian army crush the "most battle-ready group of international terrorists," apparently referring to IS.
"On the whole the task has been completed. And completed brilliantly."
Putin said last month that efforts to end the war were entering a "new stage" as the focus shifted from military intervention to political reforms.
He said both Hmeimim and Russia's naval facility in Tartus would continue to function and warned that Russia would repel any fresh attacks by militants.
"If terrorists rear their heads again we will inflict the blows that they have not seen yet," he said.
'Our homeland thanks you'
The Kremlin strongman thanked Russian troops for defending Russia from terrorism and helping Syria remain a "sovereign independent state".
Putin said the conflict proved that Russia's armed forces, including intelligence officers, pilots, sailors, special forces, military police, sappers and military advisers, were on top form, and he also praised the country's defence industry.
"Our homeland thanks you, my friends," he said. "Have a safe trip. I thank you for your service."
After his speech Putin inspected the troops who goose-stepped to the tune of a popular Soviet-era song about World War II.
Putin made the Syria stopover en route to Egypt where he arrived later Monday.
From there, Putin is scheduled to travel to Turkey for talks with President Recep Tayyip Erdogan.
Last week Putin announced he would be standing in the March presidential election that he is expected to effortlessly win, and his lighting visit to Syria can be expected to play well with the voters.
The size of the Russian deployment in Syria is not known but independent Russian military expert Pavel Felgenhauer has told AFP that up to 10,000 troops and private contractors could have taken part in the conflict.
Putin had ruled out dispatching ground forces in Syria, making the air force the mainstay of Moscow's Syria campaign.
Many in the country still harbour painful memories of the Soviet Union's disastrous venture into Afghanistan in 1979, resulting in a decade-long conflict that claimed the lives of more than 14,000 Soviet troops.
Around 40 Russian servicemen have reportedly been killed in Syria since Moscow's intervention. The Kremlin has acknowledged some of those deaths.
But the losses may be much higher given the number of Russian troops and mercenaries believed to be in the country, observers say.
Putin's stopover comes after the Russian strongman welcomed Assad for a surprise summit in November at his residence in the Black Sea resort of Sochi where the two leaders were seen embracing.
More than 340,000 people have been killed since the conflict broke out in March 2011 with protests against Assad's rule that sparked a brutal crackdown.