AMMAN/ANKARA (Reuters) - Russian air strikes on Thursday accidentally killed three Turkish soldiers during an operation against Islamic State in Syria, the Turkish military said, highlighting the risk of unintended clashes between the numerous outside powers in a complex war.

A rebel fighter stands with his weapon near a military vehicle on the outskirts of the northern Syrian town of al-Bab, Syria February 8, 2017. REUTERS/Khalil Ashawi

“During an operation by a Russia Federation warplane against Islamic State targets in the region of the Euphrates Shield operation in Syria, a bomb accidentally hit a building used by Turkish Army units,” the Turkish military said in a statement. Eleven others were wounded.

The Kremlin also said Russian President Vladimir Putin had called Turkish President Tayyip Erdogan and expressed his condolences, blaming the incident on poor coordination between Moscow and Ankara.

Besides Russia and Turkey, the foreign powers embroiled in Syria’s increasingly convoluted six-year-old war include members of a U.S.-led coalition fighting Islamic State as well as Lebanon’s Hezbollah and other Iranian-backed militias.

Russia is a key ally of Syrian President Bashar al-Assad, while Turkey supports the rebels who oppose him. In 2015, Turkey shot down a Russian air force jet that it said had crossed into Turkish airspace, though Moscow denied any incursion.

The two countries have since repaired relations, and the Kremlin statement on Thursday said the two leaders had agreed to step up military coordination against Islamic State.

U.S. Vice President Mike Pence also expressed condolences for the Turkish casualties in a call with Turkish Prime Minister Binali Yildirim, in which they discussed cooperation in the fight against terrorism, Yildirim’s office said.

CLOSING IN ON AL-BAB

Turkish-backed Syrian rebels pursued a major offensive against the IS-held Syrian city of al-Bab, 30 km (20 miles) south of the border with Turkey. The advance risks putting them in direct conflict with Syrian government forces who are closing in on the city from the south.

A rebel commander said fighters of the Free Syrian Army (FSA), working with Turkish commanders, were moving forward from territory near the western gates of al-Bab, which they had stormed on Wednesday.

“The battles began a short while ago to complete what had been achieved yesterday,” said a commander of a leading FSA group fighting in al-Bab, who requested anonymity.

The capture of the town would deepen Turkey’s influence in an area of northern Syria where it has created a de facto buffer zone. It launched its Euphrates Shield operation in August, backing Syrian rebels with special forces, tanks and aircraft to sweep Islamic State from its border area and stop the advance of a Kurdish militia.

Al-Bab is a major economic hub for the militants and lies on a key crossroads for the region north of Aleppo. Syria’s army secured a string of villages on the southern edge of the city on Thursday, state media said.

Slideshow ( 5 images )

The Turkish military said it had killed 44 militants in aerial and artillery strikes and clashes in northern Syria. Five Turkish soldiers were killed in the clashes, the private Turkish news agency Dogan said.

The Turkish-backed rebels said clashes took place for the first time with the Syrian army in the Abu Zandayn village south west of al Bab, where they were advancing.

The army aided by Iranian-backed militias made rapid gains in recent days from the south of the city seizing more than thirty villages from the militants, bringing them close to their Turkish and rebel enemies.

The army also secured a new string of villages on the southern edge of the city on Thursday and army units were now clearing out hundreds of mines and explosives planted by the militants in these villages, state media said.

Rebels said storming the city on Wednesday was to preempt any army attempt to enter before them. Turkey has said coordination with Russia prevents clashes with the Syrian forces.