MARDIN, Turkey — Turkey has handed over 18 Syrian government soldiers captured this week in northeastern Syria in a deal negotiated by Russian forces, defusing growing tensions with the administration of President Bashar al-Assad of Syria.

The Turkish Defense Ministry, which announced the handover on Twitter on Friday morning, did not say who took custody of the soldiers. They had been captured by Turkish-backed Syrian fighters south of the strategic town of Ras al-Ayn, Syria, on the limits of territory that Turkey has seized over the past three weeks to use as a buffer zone against Kurdish forces.

The announcement came as Russian and Turkish forces began their first joint patrol along the Turkish-Syrian border under an agreement to ensure the withdrawal of Kurdish forces that Turkey regards as a security threat.

Turkey controls one section of the border, while Russian and Syrian government forces have moved into other areas vacated by American troops after President Trump announced their departure last month.