Iran is ready to help Turkey and Syria resolve their differences over the nearly nine-year-old war in Syria, the Foreign Ministry said on Saturday, adding that Tehran backs the sovereignty of its key regional ally Damascus.

Turkey has backed rebels looking to oust Syrian President Bashar al-Assad, while Iran and Russia have supported Assad’s forces in the war. The three countries have also collaborated on a political solution to the conflict.

In a meeting between the visiting United Nations’ special envoy for Syria, Geir Pedersen, and Iranian officials, Tehranunderlined the importance of resolving issues in Syria through diplomacy, it said on its website.

“During the meeting, Iran reiterated that civilians in Syria should not be used as human shields and that Iran is ready to mediate between Turkey and Syria to solve the issue,” the website reported.

Iranian state TV reported that Foreign Minister Mohammad Javad Zarif, in a separate meeting with Pedersen in Tehran, said Iran was prepared to help in the de-escalation of the crisis in Syria with respect to Syria’s independence and sovereignty.

Russian-backed Syrian forces have tried to capture Syria’s Idlib province, the last rebel stronghold in the country, displacing more than half a million people since early December.

Turkish President Tayyip Erdogan has threatened to drive back the Syrian troops in Idlib unless they withdrew by the end of the month, after eight Turkish soldiers were killed on Monday by Syrian government shelling near the town of Saraqeb.