Russian President Vladimir Putin offered his condolences after three Turkish soldiers were accidentally killed in a Russian airstrike in Syria.

The soldiers were supporting rebel groups in an operation to seize the city of al-Bab from extremist group Islamic State.

The Russian Defence military said in a statement that Putin had in a telephone with Turkey's President Recep Tayyip Erdogan "expressed condolences over a tragic incident which resulted in the deaths of several Turkish troops in the al-Bab area".

The Turkish military said the soldiers were in a building when it was hit by the airstrike from a Russian plane that had been deployed to strike IS targets.

Turkey and Russia, who previously backed opposing sides in the Syrian conflict, have in recent weeks joined forces in anti-IS operations. The countries have repaired relations since 2015, when a Turkish jet shot down a Russian military helicopter.

SU-34
A Russian SU-34 bomber at Hmeimim military base in Latakia province in north-west Syria Getty Images

In a phone call earlier in the day Putin and Erdogan had pledged to increase cooperation against IS, Reuters reported.

Turkey is fighting to drive both IS and Kurdish militant groups from near the Turkish border.