ANKARA (Reuters) - Turkey, Iran and Russia pledged on Wednesday to accelerate efforts to bring stability to Syria, underlining their joint commitment to the country a day after President Donald Trump raised the prospect of withdrawing U.S. troops.

A statement by the three countries after a summit meeting of their leaders in the Turkish capital Ankara said they were determined to “speed up their efforts to ensure calm on the ground” in Syria.

While their decision to work together has done little to reduce violence, in part because of their own military interventions on opposing sides, it underlined their central role just as questions grow over Washington’s presence in Syria.

A senior U.S. official said Trump wanted U.S. forces out of Syria relatively soon. “We’re not going to immediately withdraw but neither is the president willing to back a long-term commitment,” the official said.

Around 2,000 U.S. troops are deployed in northern Syria on a mission to battle the remnants of an Islamic State force that once controlled the area. Trump had said on Tuesday it was time to pull them out.

Iran’s President Hassan Rouhani said developments in Syria, where the Syrian army and its allies have driven back rebels in recent years, showed that the United States had “failed to topple the Syrian government” of President Bashar al-Assad.

“They wanted to fuel insecurity in order to maintain their own interests but they have gained no success,” he told a news conference after talks with Turkish President Tayyip Erdogan and Russian President Vladimir Putin. He added, however, that he believed U.S. forces would stay in Syria.

RIFTS CONTINUE

Iran and Russia have both strongly supported the Syrian president, while Turkey backed anti-Assad rebels. Those differences have continued on the ground despite their political cooperation aimed at winding down some of the violence.

Slideshow ( 9 images )

Turkey has waged a military campaign to drive Kurdish YPG fighters from northwestern Syria’s Afrin district, while Russian air power and Iran-backed militias have supported Syrian army offensives in the Idlib and Ghouta regions.

Iran’s state television quoted Rouhani as telling Erdogan and Putin that Afrin should be handed over to Syria’s army.

Slideshow ( 9 images )

“The developments in Afrin can only be useful if they do not violate Syria’s territorial integrity, and control of these areas should be handed over to the Syrian army,” Rouhani said.

Erdogan has said the Turkish army will extend its military operation after Afrin to the town of Tel Rifaat and then further east along Syria’s border with Turkey - a prospect which has angered Tehran.

“Whatever the intentions are, Turkey’s moves in Syria, whether in Afrin, Tel Rifaat or any other part of Syria, should be halted as soon as possible,” a senior Iranian official told Reuters before Wednesday’s talks.

Seated alongside Putin and Rouhani, Erdogan focused on areas of common ground, saying that Turkey wanted to build a mobile hospital to help treat civilians coming from formerly rebel-controlled parts of eastern Ghouta, on the edge of Damascus, which the Syrian army has taken over.

Rebel fighters and civilians who were evacuated from eastern Ghouta have been taken to the northwestern Syrian province of Idlib, which borders Turkey.

Erdogan proposed providing a bakery to help feed refugees and build housing on both sides of the border.

“We can save these people from tents and container cities by building housing. We can, all together, make that zone safe,” Erdogan said.