MOSCOW – Turkish President Recep Tayyip Erdogan sat down for Syria-focused talks with his Russian counterpart Vladimir Putin on Wednesday as their governments bargain over zones of influence in the war-torn country.

The leaders share strong opposition to the U.S. military presence in Syria, seeing it as an obstacle to their clout in the country. The Kremlin meeting marked their first encounter since U.S. President Donald Trump announced the pullout in a Dec. 19 tweet.

Putin and Erdogan called each other “dear friend” while exchanging greetings at the start of the talks, hailing the close ties between their countries and their importance for regional security.

Russia and Iran have helped Syrian President Bashar Assad to win back control of most of the country, while Turkey has backed Assad’s foes during the nearly eight-year conflict. Despite that, the three countries have teamed up to broker a peace deal for Syria, united by their shared desire to undercut the U.S. clout in the region.

The agreement is now tested by Trump’s abrupt decision to withdraw from Syria that has left Moscow, Ankara and Tehran jockeying for influence in the country.

Russia says it expects Assad’s government to take over Kurdish-held border regions east of the Euphrates River following the planned U.S. troop withdrawal from the area, while Turkey objects to the prospect.

Ankara strongly supports the creation of a 32-kilometer (20-mile) “safe zone” in northeastern Syria to ensure that Syrian Kurdish militia – The People’s Protection Units, or YPG, which Turkey considers to be a “terrorist group” for its ties to outlawed Kurdish rebels inside Turkey – is kept away from the Turkish border.

Moscow has signaled it could be open for discussions on the Turkish push for carving out the zone, but warned that it’s essential that the Syrian government takes over areas currently controlled by the U.S. and its Kurdish allies.

Turkey fears any deal between the Syrian government and the YPG in the border area as well as in the strategic town of Manbij, under which the Kurdish militia would remain a threat to Turkey’s security.

Russia appears eager to sponsor Damascus’ talks with the Kurds in the hope that it would extend the Syrian government’s gains and further cement its hold on the country. The U.S. withdrawal has further bolstered Russia’s role as the top power broker in Syria.

Syrian pro-government paper Al-Watan reported Tuesday that a Kurdish delegation arrived in Moscow a day before Erdogan. There was no independent confirmation yet from Kurdish officials.

At the same time, Putin appears willing to accommodate Turkish security interests in Syria, seeing strong ties with Turkey as an essential counterbalance to the U.S. clout in the region.

Turkey pointed at recent suicide bombings in Syria to argue that the Kurdish militia has proven inefficient in fighting the Islamic State group.

“The sudden increase in the number of attacks on U.S. troops suggest that the YPG is either unable or unwilling to stop (IS) operations in northeastern Syria,” Fahrettin Altun, the Turkish presidential communications director, wrote in an opinion piece published by the Al-Jazeera news website.

Russian and Turkish interests also collide in the northwestern province of Idlib, which is packed with 3 million people, including many who were displaced from other parts of the country.

Last September, Putin and Erdogan struck a de-escalation deal on Idlib that averted the Syrian offensive that sparked fears of a humanitarian catastrophe. The agreement created a security zone free of heavy weapons and monitored by Turkish troops to halt fighting.

Turkey is pushing for that deal to stay, fearing that the Syrian government forces are trying to undermine the agreement.

Russia, in its turn, has urged Turkey to act more resolutely in reining in militants in Idlib who have launched attacks on Syrian government forces and the Russian military.

Russian Foreign Ministry spokeswoman Maria Zakharova charged Wednesday that al-Qaida linked militants have effectively taken control of the area, noting that the escalation of hostilities in Idlib threatens the Russian air base in the neighboring coastal province of Latakia.