Russian President Vladimir Putin has said a truce in Syria is on the whole being observed, as he welcomed his Turkish counterpart Recep Tayyip Erdogan in Moscow, adding that he is cautiously optimistic about the prospects of a deal to end the six-year Syrian conflict.

Russia and Turkey, which back opposing sides in Syria's war, co-brokered a ceasefire in December that helped reduce the scale of fighting between Syrian President Bashar al-Assad and the opposition.

They also supported two rounds of talks this year between the government and the rebels, while a third set is scheduled for next week.

READ MORE: Turkey-Russia-US meeting addresses 'risk of conflict'

"Due to the active action of Turkey and Russia, we managed to bring the rival forces together and, due to our joint effort, the Syrian ceasefire continues," Putin told reporters on Friday, hailing Ankara's "exceptional cooperation" in keeping the truce.

For his part, Erdogan said that there are "no doubts" about the "very successful" Syria talks sponsored by the two countries, adding that Turkey was cooperating with Russia's military.

AL JAZEERA'S RORY CHALLANDS, IN MOSCOW: On the close collaboration between Russia and Turkey: The changing dynamics of the Syrian conflict have played a large role in the rapprochement between Russia and Turkey, but we should probably also look closer to home. I don't think it's a coincidence that it was in the days immediately following the attempted coup in Turkey that Erdogan had just survived that Ankara decided to recalibrate its foreign policy and warm relations both with Russia and Israel. Of course, there were economic factors that played a role too, because the sanctions that Russia had put in place following the shooting down of the Russian jet were hurting Ankara quite badly, so Turkey needed to recalibrate and adopt a more conciliatory position towards some of its regional rivals. On remaining differences: Erdogan wants the economic sanctions to be lifted fully, but they are not yet. There are a still few that remain in place, and they are taking a little while to be rolled back by Moscow. Also, when it comes to Syria, Turkey and Russia have deep differences: they differ over the fate of Assad who is still in power, and they differ over who exactly constitutes a "terrorist" group. For the Turks, the Kurdish fighters operating along the Turkish border in Syria are just as abhorrent for Ankara as ISIL is, but for Russia, the Kurds are a perfectly acceptable partner to be dealt with.

"All parties need to work out towards a good resolution," he said at the joint press conference in the Russian capital.

Erdogan also praised the two countries' friendship, saying it is "strong enough to overcome their differences", even as he urged Russia to lift all sanctions it imposed on Ankara following the downing of a Russian plane in 2015.

The increasingly close cooperation on Syria between Russia and Turkey marks a sharp turnaround for the two nations, which have also coordinated their operations against the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) armed group in Syria.

Russia has an active military presence in Syria in support of Assad's forces, while Turkey, which backs anti-Assad groups, launched a military operation in August to create a safe zone along its border inside Syria.

A Russian air raid last month accidentally killed three Turkish soldiers, but the incident did not derail military coordination between the two countries.

Russia's ambassador to Turkey was also killed during an event in Ankara in December.

Earlier this week, the chief military officers from Russia, the US and Turkey met in the Turkish city of Antalya, in an apparent attempt to work out additional steps to prevent incidents.

Rebuilding ties

Relations between Moscow and Ankara had soured after Turkey downed the Russian jet, putting the two countries on the verge of a direct military conflict.

Moscow responded by barring the sales of package tours to Turkey and halting imports of agricultural products, moves that squeezed the Turkish economy.

Erdogan's apologies for downing the plane helped rebuild ties, and Putin offered firm support to the Turkish leader in the wake of a failed coup attempt last July.

Despite the rapprochement, Russia has moved gradually to lift economic restrictions, keeping some in place as an apparent motivator for Turkey.

On the eve of the Kremlin talks, the Russian cabinet allowed the imports of Turkish cauliflower, broccoli and other produce.

Erdogan, who called the Russian leader his "dear friend", urged Russia to lift all restrictions on Turkish business, restore visa-free travel and increase the number of commercial flights between the two countries.

The talks in Moscow also focused on how to help assuage mutual mistrust between Turkish-backed Syrian opposition forces, US-backed Kurdish forces, and Russian-allied Syrian government forces - all fighting their way towards ISIL's de-facto capital, Raqqa.

Putin scheduled a meeting of his security council, including top military and intelligence officials, later on Friday to follow the talks with Erdogan.