Russia’s President Vladimir Putin has ordered Russian forces to begin withdrawing from Syria during a surprise visit to the Arab country, RIA Novosti news agency reported.

Putin visited Russia's Hmeimim air base in the Latakia province on Monday and also held talks with Syrian President Bashar al-Assad.

"I order the defense minister and the chief of general staff to start withdrawing the Russian group of troops to their permanent bases," RIA quoted him as saying.

"I have taken a decision: a significant part of the Russian troop contingent located in Syria is returning home to Russia," Putin added.

The Russian leader congratulated his country's troops over the defeat of Daesh in Syria, saying the threat of Takfiri terrorism had been removed in the country for the most part.

"The task of fighting armed bandits here in Syria, a task that it was essential to solve with the help of extensive use of armed force, has for the most part, been solved and solved spectacularly," Putin said.

"I congratulate you!," he told Russian servicemen gathered at the base where he also met the Syrian president.

Putin stressed that Moscow would keep the Hmeimim air base in Latakia as well as Russia’s naval facility at the Syrian port of Tartous "on a permanent basis".

A handout picture taken on June 18, 2016 shows Russian Defense Minister Sergei Shoigu (C) visiting the air base in Hmeimim in the Syrian coastal province of Latakia.

Putin made the stopover on his way to Egypt where he arrived later Monday.

Since September 2016, Moscow has been targeting the positions of Daesh and other militant groups upon an official request from the Damascus government.

Putin’s decision on Monday came a few days after he declared a "complete victory" over Daesh on both banks of the Euphrates River in Syria as he stressed the significance of switching to a political process to ultimately end the crisis in the Arab country.

The US, which has set up more than a dozen military bases in Syria without the Arab country's consent or a UN mandate, has said it planned to stay indefinitely.

"We’re not going to just walk away right now," the US Secretary of Defense Jim Mattis said recently.

Since September 2014, the US has been carrying out bombings against what it calls Daesh positions in Syria. The government in Damascus says the airstrikes have harmed Syria's infrastructure and claimed the lives of many civilians without making a dent in the capability of the terrorists.

Washington is also aiding some militant groups which are increasingly posing a challenge to the Syrian government.