Russian President Vladimir Putin and his Turkish counterpart Recep Tayyip Erdogan vowed to co-ordinate their actions more closely in Syria.
"Co-operation between Russia and Turkey is a touchstone for Syrian peace and stability," Mr Erdogan said at a joint press conference after talks in Moscow on Wednesday.
"With our Russian friends we intend to strengthen our co-ordination even more."
"We agreed how we'll co-ordinate our work in the near future," Mr Putin said, calling the talks, which lasted about three hours and included the countries' defence ministers, "effective".
At the start of their meeting in the Kremlin, Mr Putin addressed Mr Erdogan as "dear friend", and said their countries "work on issues of regional security and actively co-operate on Syria".
Mr Erdogan used the same term for Mr Putin and said "our solidarity makes a weighty contribution to the security of the region".
The two leaders are on opposite sides of the Syria conflict: Russia provides critical support to the Syrian government, while Turkey has backed rebel groups fighting President Bashar Al Assad's forces.
Despite this, they have worked closely to find a political solution to the seven-year conflict.
Russia and Turkey have agreed to co-ordinate ground operations in Syria following US President Donald Trump's shock announcement last month about pulling 2,000 American troops out of Syria.
Mr Putin said that if carried out, the withdrawal of US troops from north-eastern Syria "will be a positive step, it will help stabilise the situation in this restive area".
Turkey has also welcomed Washington's planned withdrawal, but the future of US-backed Kurdish militia forces considered terrorists by Ankara has upset ties between the Nato allies.
Mr Erdogan said on Monday that he would discuss with Mr Putin the creation of a Turkish-controlled "security zone" in northern Syria, suggested by Mr Trump.
The US-allied Kurds, who control much of the north, have rejected the idea, fearing a Turkish offensive against territory under their control.
Mr Putin said on Wednesday that Russia supported "establishing dialogue between Damascus officials and representatives of the Kurds".
Russian Foreign Minister Sergey Lavrov last week said that Damascus must take control of the north.
The north-western province of Idlib earlier this month fell under the full control of a group dominated by Syria's formerly Al Qaeda-linked organisation.
The Russian foreign ministry said earlier on Wednesday that the situation in the province remained of "serious concern".
Mr Putin said that the leaders discussed the situation in Idlib "in great detail today".
"We have a shared conviction that we must continue jointly fighting terrorists wherever they are, including in the Idlib zone," the Russian leader said.
Mr Erdogan said the countries would wage a "lengthy fight" in Syria.
Nearly eight years into Syria's conflict, the planned US pullout has led to another crucial step in Mr Assad's Russian-backed drive to reassert control.
Kurdish forces who were left exposed by Mr Trump's pledge to withdraw have asked the Syrian regime for help to face a threatened Turkish offensive.
The Kremlin hailed the entry by Syrian forces into the northern city of Manbij for the first time in six years after Kurds opened the gates.
Moscow plans to organise a three-way summit with Turkey and Iran early this year as part of the Astana peace process, launched by the three countries in 2017.
Mr Putin said on Wednesday the next summit would be held "in the near future" in Russia, saying the leaders still needed to agree the time and location with Iran.
The last meeting between Mr Putin, Mr Erdogan and Iran's Hassan Rouhani took place in Iran in September last year with the fate of Idlib province dominating the agenda.
Ties between Russia and Turkey plunged to their lowest level in years in November 2015 when Turkish forces shot down a Russian warplane over Syria.
But after a reconciliation deal in 2016, relations have recovered at a remarkable speed with the two leaders co-operating closely over Syria, Turkey buying Russian-made air defence systems and Russia building Turkey's first nuclear power plant.