Following talks in Ankara, the Turkish and Russian presidents said they agreed to closely cooperate on ending Syria’s civil war.

Russian President Vladimir Putin said in the Turkish capital on September 28 that Moscow and Ankara will work to "deepen coordination" on ending the six-year-old war, adding the "necessary conditions" now existed for the conflict to end.

Putin spoke at a joint press conference with Turkish President Recep Tayyip Erdogan, who said that Turkey “will continue close cooperation with Russia for reaching a political solution to the crisis in Syria."

Erdogan said that the pair agreed to "pursue more intensely" the creation of a “de-escalation zone” in Idlib Province, in comments echoed by his Russian counterpart.

"Readiness was confirmed to comply with the final agreements on creating four de-escalation zones, including the biggest of them in Idlib Province," Putin said.

Moscow and Ankara support different sides in Syria’s war. Russia and Iran are backing Syrian President Bashar al-Assad in the conflict, while Turkey and the United States are supporting various rebel groups opposed to Assad’s rule.

But Russia, Turkey, and Iran earlier this month agreed to create a "de-escalation zone" in Idlib, an area under the control of opposition forces in northern regions. Three other "de-escalation zones" have come into effect in different parts of Syria since July.

Islamic State (IS) fighters, who captured large swathes of Syrian territory in 2014, are opposed by all sides and are being driven from most of their strongholds by the separate government and rebel campaigns.

Putin's one-day working visit to Ankara comes three days after the two leaders spoke by telephone in a call that included a discussion of the controversial independence referendum in Iraq’s autonomous Kurdish region.

Erdogan said after meeting Putin on September 28 that Ankara and Moscow agree that the territorial integrity of both Iraq and neighboring Syria must be preserved.

He added that the September 25 nonbinding referendum in Iraq’s Kurdish region had no legitimacy and that the regional leaders must be prevented from making "bigger mistakes."

Ankara sees the vote, which was also fiercely opposed by the Baghdad government and much of the international community, as a threat to its national security and fears it will inflame separatism among its own Kurdish population.

However, the Kremlin has not explicitly condemned the referendum, stressing instead the importance of maintaining Iraq’s territorial integrity.

Relations between Moscow and Ankara soured after a Turkish fighter jet shot down a Russian warplane on the Syrian border in late 2015.

The two sides, however, have since established closer ties amid mounting tension in U.S.-Turkish ties on a range of issues, including Washington’s support for Syrian Kurdish fighters considered terrorists by Ankara.

Earlier this month, Turkey signed a deal with Russia to buy S-400 antiaircraft missile systems in its first major weapons purchase from Moscow.

The deal, Turkey’s most significant weapons purchase from a non-NATO supplier, has raised concerns in the West over technical compatibility with NATO equipment.

Both Moscow and Ankara have brushed off those concerns, with Erdogan saying on September 12 that Turkey “makes the decisions about our own independence ourselves.”