Russian President Vladimir Putin on Monday ordered the partial withdrawal of his troops from war-torn Syria, AFP reported. Putin passed the order during a surprise visit to the country.

Putin thanked the soldiers for their service. “I order the defence minister and the chief of general staff to start withdrawing the Russian group of troops to their permanent bases,” Putin said during his address in Russia’s Hmeimim airbase in Syria. “I have taken a decision. A significant part of the Russian troop contingent located in Syria is returning home to Russia.”

Russia, an ally of Syria’s President Bashar al-Assad, began a military intervention in September 2015 to help the Syrian government regain territory from the Islamic State. The civil war has claimed the lives of more than 3.4 lakh people and left huge swathes of Syrians as refugees.

Syrian President Bashar al- Assad, who welcomed Putin to the country, said Russian troops had helped the Syrian army defeat the “most battle-ready group of international terrorists”. In November, Putin had said that priority in Syria had changed from military intervention to political reform.