(CNN) Russian President Vladimir Putin told Syrian President Bashar al-Assad Thursday that "foreign armed forces" would leave Syria, according to Syria's state-run news agency, SANA.

Assad was on a surprise visit to Russia. He and his counterpart hailed the beginning of the "political process" in Syria amid an ongoing "fight against terrorism."

"We presume that, in connection with the significant victories and success of the Syrian army in the fight against terrorism, with the onset of a more active part, with the onset of the political process in its more active phase, foreign armed forces will be withdrawn from the territory of the Syrian Arab Republic," Putin said after Thursday's meeting.

The US, Iran, Turkey, Russia and some other countries have troops in Syria. Russia emerged as Assad's most powerful backer, helping to put down a rebellion against the Syrian President when it intervened on his behalf in 2015.

Russian President Vladimir Putin speaks with his Syrian counterpart Bashar al-Assad.

Iran is another important Assad ally. Along with Hezbollah and other Iran-backed armed groups, Iran has helped to prop up the embattled President.