Russian President Vladimir Putin has renewed his call for a political solution to the war in Syria, during a rare visit by his Syrian counterpart.
Mr Putin told Bashar al-Assad the military campaign was “wrapping up”, but there was still “a long way to go”.
A two-year Russian air campaign has given Mr Assad a clear upper hand in the civil war, which began in 2011.
The meeting comes ahead of talks between the president’s allies, Russia and Iran, and rebel backer Turkey.
The three powers have increasingly co-operated in recent months to set up a series of so-called “de-escalation zones” aimed at calming fighting in western Syria.
Speaking to Russian television after the meeting on Monday evening, Mr Putin said he intended to talk with US President Donald Trump and the Emir of Qatar about a resolution to the conflict.
“We still have a long way to go before we achieve a complete victory over terrorists,” Mr Putin said at the meeting in Sochi. “But as far as our joint work in fighting terrorism on the territory of Syria is concerned, this military operation is indeed wrapping up.”
The Syrian and Russian leaders have long characterised Syrian rebels as terrorists.
Mr Assad was on Russian soil for four hours, a Kremlin spokesman told the RIA news agency. He last visited Mr Putin in Russia in October 2015, a month after the Russian military launched a campaign against his opponents.
Mr Putin announced in March 2016 that his forces had largely achieved their objectives in Syria, but the campaign continued.
Russian has been accused of killing hundreds of Syrian civilians with its air strikes, something it has denied.
Speaking to Russian state television after the meeting, Mr Assad said: “At this stage, especially after we achieved victory over terrorists, it is in our interests to move forward with the political process.”
The leaders of the US, UK, France, Germany and the EU have all called for Mr Assad to step down since the beginning of the country’s bloody civil conflict, and the issue of Mr Assad’s future has been a stumbling block in previous peace talks.
Various Syrian opposition factions are due to meet in the Saudi capital, Riyadh, on Wednesday, to try to form a single representative body for the latest round of UN-backed talks in Geneva next week.
The head of an umbrella group that represented the opposition at the previous round, the High Negotiations Committee (HNC), stepped down on Monday.
Riyad Hijab wrote on Twitter that he had been “forced to announce” his resignation after almost two years in post, but wished the committee “further achievements”.