President Vladimir Putin on Monday ordered Russian forces in Syria to start withdrawing, claiming that after a two-year military campaign, Moscow and Damascus had achieved their mission of destroying ISIS.

Putin made the announcement during a surprise visit to Russia's Hmeymim airbase about 300 kilometres northwest of Damascus, where he held talks with Syrian President Bashar al-Assad and addressed Russian military service personnel.

Various international forces have made claims of defeating ISIS in different parts of Syria.

In a televised speech to the Russian troops at the base, Putin hailed their "excellent" performance in Syria, where the Russian military declared victory against ISIS group last week.

"You have shown the best qualities of a Russian soldier — courage, valour, team spirit, decisiveness and excellent skills," he said. "The motherland is proud of you."

A Russian soldier stands guard near a Syrian national flag drawn on the wall as rebel fighters and their families leave the besieged Waer district in the central Syrian city of Homs, after an agreement reached between rebels and Syria's army, on May 21. (Omar Sanadiki/Reuters)

Russia launched its air campaign in Syria at the end of September 2015, when Assad's government was teetering on the brink of collapse, and quickly changed the course of the conflict. Russian officials say the troops were sent to Syria mainly to fight "terrorists," including ISIS and al-Qaeda, but they also battled mainstream rebels opposed to the Assad family's four-decade rule.

Russian television stations showed Putin walking off the plane at the airbase, embracing and shaking hands with Assad. The two then visited a military operations room.

Putin's first visit

Putin has hosted Assad twice in the past six years, but it was Putin's first trip to Syria. It was also the first visit by a foreign head of state to war-ravaged Syria since the civil war began in 2011.

Putin said that he had ordered the military to withdraw a "significant part" of the Russian contingent in Syria.

"Friends, the motherland is waiting for you," Putin said. "You are coming back home with victory!"

Gen. Sergei Surovikin, the Russian military commander in Syria, said the military will pull out 23 warplanes, two helicopter gunships, special forces units, military police and field engineers.

Surovikin said the remaining forces will be sufficient to "successfully fulfil the tasks" to stabilize the situation in Syria. He did not say how many troops and weapons would stay behind.

Putin said Russia would maintain its presence at the Hmeymim airbase as well as a naval facility at the Syrian port of Tartous.

Insurgents still control several areas in Syria, but much of the fighting has been paused by "de-escalation" agreements brokered by Russia and Iran, which support Assad, and Turkey, which backs the rebels.

Putin told Assad he would discuss the prospects for a peace settlement with the leaders of Egypt and Turkey later on Monday.

"I hope that together with Turkey and Iran we will succeed in restoring peaceful life and launch a political process to settle the situation in Syria," Putin said.