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.

Putin hosted Assad in the Black Sea resort of Sochi on Monday ahead of a summit between Russia, Turkey and Iran and a new round of Syria peace talks in Geneva.

The meeting was not announced and the Kremlin did not make it public until yesterday morning.

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 Daesh group in Syria. Syrian troops and their Iran-backed allies marched into the town under the cover of Russian air strikes.

“I passed to [Putin] and all Russian people our greetings and gratitude for all of the efforts that Russia made to save our country,” said Assad, who has ventured outside his war-ravaged country only twice since the conflict began – both times to Russia.

This week’s visit to meet Putin is his second since 2011, the year a civil war erupted that has killed some 400,000 people and resulted in millions of refugees.

The first meeting was in October 2015, shortly after Russia launched its military campaign in Syria to support 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 Assad’s main backers while Turkey supports the opposition.

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” agreements will be “viable,” said Dmitry Peskov, Putin’s spokesman.

Asked whether Putin and Assad have talked about the Syrian President’s future in post-war Syria, Peskov said “possible options for political settlement have been discussed.”

Faced with pressure from other countries urging Assad to step down, Moscow has insisted it is up to the Syrian people to vote Assad in or out.

With the Syrian government controlling most of the country and Daesh fighters in disarray, Putin told Assad in Sochi that Moscow is about to curtail its military presence in Syria.

“Regarding our joint operation to fight terrorists in Syria, this military operation is indeed coming to an end,” he told 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.

In March 2016 Putin 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 only to continue to operate warships in the Mediterranean as late as this autumn.

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.”

Assad said the Russian Air Force helped Syrian troops in the fight against insurgents, helping many return home.

“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.”