ANKARA/BEIRUT (Reuters) - Turkey said on Wednesday it will press its military offensive in Syria until Islamic State is driven from the town of al-Bab, despite a warning from forces allied to Syrian President Bashar al-Assad and a helicopter attack on the rebels it backs.

Turkish President Tayyip Erdogan makes a speech during his meeting with mukhtars at the Presidential Palace in Ankara, Turkey, October 26, 2016. Yasin Bulbul/Presidential Palace/Handout via REUTERS

Turkey’s incursion into Syria, launched two months ago to drive Islamic State militants from its border and prevent Kurdish fighters from gaining ground in their wake, has complicated an already messy battlefield in northern Syria.

As the Turkey-backed rebels push south towards al-Bab, an Islamic State-held town 35 km (22 miles) northeast of Aleppo, they face confrontation with both Kurdish and pro-Assad forces, whose frontlines lie close by.

The field commander of the forces allied to the Syrian leader - which include the Lebanese group Hezbollah, Iraqi militias and the Iranian Revolutionary Guards - warned Turkey any advance towards their positions north and east of Aleppo would be met “decisively and with force”.

The commander, who was not identified by name, nationality or affiliation, made the comments during a tour of frontlines to the north of Aleppo in a written statement sent to Reuters. They came a day after what the Turkish military said was a barrel bomb attack on the rebels its backs by a Syrian helicopter.

“This kind of attack will not stop our fight against Daesh (Islamic State),” Turkish Foreign Minister Mevlut Cavusoglu told a news conference in the capital Ankara.

“This operation will continue until al-Bab. The operation needs to continue, and it will,” he said.

President Tayyip Erdogan said Turkey’s military operations in Syria aimed to secure al-Bab and the town of Manbij, which a group of Kurdish and Arab militias seized from Islamic State in August, but were not intended to stretch to Aleppo.

“Let’s make a joint fight against terrorist organizations. But Aleppo belongs to the people of Aleppo ... making calculations over Aleppo would not be right,” he said in a speech in Ankara.

U.S. President Barack Obama, in a telephone call with Erdogan on Wednesday, recognized Turkey’s contributions to the fight against Islamic State, especially is supporting Syrian forces that have cleared the jihadists from the Turkish border, the White House said.

Obama “noted the need for close coordination” between the two countries to apply sustained pressure on Islamic State in Syria, the White House said in a statement.

The two leaders also agreed on the importance of denying Kurdish PKK militants a safe haven in northern Iraq, it added.

FIRST DIRECT CLASH

The Turkish military said a helicopter “assessed to belong to regime forces” bombed the rebels it backs in a village near Akhtarin, a town 5 km (3 miles) southeast of Dabiq, late on Tuesday. Dabiq is a former Islamic State stronghold that the rebels seized from the jihadists this month.

It was the first time a direct clash between Syrian forces and the Turkey-backed rebels has been announced. Two rebels were killed and five wounded, the Turkish army said.

The Syrian military could not immediately be reached for comment, but it said last week that the presence of Turkish troops on Syrian soil was a “dangerous escalation and flagrant breach of Syria’s sovereignty”. It warned it would bring down any Turkish warplanes entering Syrian air space.

Turkey launched “Operation Euphrates Shield” two months ago, sending tanks and warplanes into Syria in support of the largely Turkmen and Arab rebels.

Erdogan signaled Turkey could target the Afrin region of northwest Syria, which is controlled by Kurdish YPG forces and lies just west of the “Euphrates Shield” area of operations.

“In order to defeat threats directed at our nation from Kilis to Kirikhan, we are also putting that area on our agenda of cleansing from terror,” he said, referring to two Turkish towns across the border from Afrin.