Turkish President Recep Tayyip Erdogan and Iranian counterpart Hassan Rouhani on Thursday vowed to work closer to end the fighting in Syria.
But the two leaders made no comment on President Donald Trump's shock announcement that he was pulling U.S. troops out of the war-ravaged nation.
"There are many steps that Turkey and Iran can take together to stop the fighting in the region and to establish peace," said Erdogan, without elaborating, at a joint news conference with Rouhani in Ankara.
"Syria's territorial integrity must be respected by all sides. Both countries are of the same opinion regarding this," Rouhani said in translated remarks.
The two leaders' meeting had been arranged before Trump's announcement about the U.S. pull-out, a move already welcomed on Thursday by Russian President Vladimir Putin.
Some Western analysts consider the US presence a key counterweight to Iranian influence in the region.
Ankara has repeatedly called for Syrian President Bashar al-Assad's ouster and supported Syrian opposition fighters.
Tehran and Moscow meanwhile are Damascus's strongest allies and have helped to turn the war in Assad's favour.
Turkey, despite its differences with Iran and Russia over Syria, has worked closely with both countries to find a political solution to the war through the Astana process launched last year.
As part of the peace talks which began in the Kazakh capital, Turkey, Iran and Russia agreed four "de-escalation" zones in Syria. All of those except the northwestern province of Idlib have been retaken by Damascus.
At Thursday's news conference, Rouhani said Turkey and Iran would continue their cooperation under the Astana peace process.
Turkey 'stands by Iran'
Erdogan threatened last week to launch a new operation east of the Euphrates in northern Syria against the Kurdish People's Protection Units (YPG).
This US-backed Kurdish militia is viewed by Ankara as a "terrorist offshoot" of Kurdish insurgents inside Turkey.
There are around 2,000 US forces in Syria, most of them on a train-and-advise mission helping the YPG under the banner of the Kurdish-led Syrian Democratic Forces (SDF) alliance fighting against the Islamic State extremist group.
Turkey and Iran, regional rivals for centuries, have in recent times focused on developing a pragmatic relationship and boosting trade.
Erdogan on Thursday repeated Turkey's criticism of the U.S. this year pulling out of the nuclear deal with Iran and imposing new sanctions on the Islamic republic.
"I want to stress once more than we (Turkey) do not support these decisions and that American's sanctions against Iran increase the risks to the region's safety," he said, adding that Turkey would "stand by the Iranian people".
The deal envisaged sanctions on Iran being lifted in return for it accepting inspections by the UN atomic watchdog and limits on its nuclear activities.