Russia is close to ending its military operation in Syria that tipped the scales in the devastating war in favour of government forces, President Vladimir Putin has said.
The Russian leader was speaking at surprise talks with Syrian president Bashar Assad.
Mr Putin hosted Mr Assad in the Black Sea resort of Sochi yesterday ahead of a summit between Russia, Turkey and Iran and a new round of Syria peace talks in Geneva.
The meeting was unannounced and the Kremlin did not make it public until this morning.
"I passed to (Putin) and all Russian people our greetings and gratitude for all of the efforts that Russia made to save our country," Mr Assad said.
Mr Assad has only ventured outside his war-ravaged nation twice since the conflict began - both times to Russia.
This week's visit to meet Mr Putin is his second since the crisis began in March 2011 leading to a civil war that has killed some 400,000 people and resulted in millions of refugees.
The first was in October 2015, shortly after Russia launched its military campaign in Syria to shore up Mr Assad's forces..
The meeting in Sochi, which lasted three hours, came ahead of a summit between the presidents of Iran, Russia and Turkey. Iran and Russia have been Mr Assad's main backers while Turkey supports the opposition.
Mr Putin had spoken with the leaders of Iran and Turkey to "assure them that Russia will work with Syrian leadership to prepare the groundwork for possible understandings" that could be reached on Wednesday to "make sure" that agreements will be "viable," said Dmitry Peskov, Mr Putin's spokesman.
The Kremlin said Mr Putin would call US president Donald Trump and Saudi King Salman to discuss the situation in Syria tomorrow.
Asked whether Mr Putin and Mr Assad have talked about the Syrian president's future in post-war Syria, Mr Peskov said "possible options for political settlement have been discussed."
Faced with pressure from other nations urging Mr Assad to step down, Moscow has insisted that it is up to the Syrian people to vote Mr Assad in or out.
With the Syrian government controlling most of the country and so-called 'Islamic State' ('IS') fighters in disarray, Mr Putin told Mr Assad at yesterday's meeting that Moscow is about to curtail its military presence there.
"Regarding our joint operation to fight terrorists in Syria, this military operation is indeed coming to an end," he told Mr Assad in televised remarks.
"I'm pleased to see your willingness to work with everyone who wants peace and settlement."
The Kremlin has announced scale-downs and a halt in its operation in Syria before but did not follow through.
Mr Putin in March 2016 ordered a withdrawal from Syria, saying "all the tasks have been accomplished".
In January, Russia said it was pulling out its aircraft carrier and other warships from the waters off Syria. Russia continued to operate warships off the Syrian shore as late as this autumn.
Footage and photographs released by the Kremlin press office showed Mr Putin giving Mr Assad a warm embrace on his arrival at Mr Putin's residence in Sochi.
Russian television showed footage of Mr Putin and Mr Assad entering a meeting with Russia's defence ministry and the General Staff.
"I asked the Syrian president to stop by," Mr Putin told the Russian generals. He then referred to Mr Assad and said: "I would like to introduce you to people who played a key role in saving Syria."
Mr Assad's office quoted him as thanking Russia and its military, which he said "gave martyrs and made efforts in Syria".
He added: "I was very happy to know that you are here since you are the officers who directly took part in the battle in Syria."
Mr Assad said the Russian Air Force helped Syrian troops in the fight against insurgents, helping many Syrians to return to their homes.
"In the name of the Syrian people, I greet you and thank you all, every Russian officer, fighter and pilot that took part in this war."
The meeting came two days after Syrian troops and their allies captured the eastern town of Boukamal, the last major inhabited area held by the 'IS' group in Syria. Syrian troops and their Iran-backed allies marched into the town under the cover of Russian air strikes.