Syrian government forces have advanced on the ISIL-held city of al-Bab, cutting off the last supply route that connects it to the armed group's strongholds further east towards Iraq, according to a monitoring group.

ISIL fighters in the area are now effectively surrounded by the Syrian army from the south and by Turkish-backed rebels from the north, as Damascus and Ankara race to capture the largest stronghold of the armed group in Aleppo province, the Syrian Observatory for Human Rights said on Monday.

The British-based war monitor, which tracks developments in Syria's conflict, added that the army and allied militia had made gains southeast of al-Bab overnight and fought ISIL there on Monday.

Backed by air strikes, they severed a road that links the city to other ISIL-held territory in Raqqa and Deir Az Zor provinces, it said.

A military commander in the alliance fighting in support of President Bashar al-Assad said ISIL, which stands for Islamic State of Iraq and the Levant and is also known as ISIS, was now encircled.

"There is one narrow passage left out of al-Bab," the commander told the Reuters news agency. Government forces now had most of it "within close firing range", he said.

Key city

The Syrian army's advance towards al-Bab risks triggering a confrontation with the Turkish military and its allies - rebel groups fighting under the Free Syria Army (FSA) banner - which have been waging their own campaign to take the city.

In three weeks, Syrian army units moved to within 6km of al-Bab, as Damascus seeks to stop Turkey from penetrating deeper into a strategic area of northern Syria.

READ MORE: Russian and Turkish jets 'bomb ISIL' in Syria's Al Bab

"It's clear the regime is in a hurry to reach al-Bab," Mustafa Sejari, a senior rebel official in the FSA group Liwa al-Mutasem, told Reuters. The Turkish-backed rebels, who have also had the city in their sights for months, would fight government forces if they got in the way, he said.

Turkey launched its campaign in Syria, "Euphrates Shield", in August to secure its frontier from ISIL and halt the advance of the powerful Kurdish YPG militia.

Backed by Turkey's air force, Turkish troops and FSA rebels on Monday clashed with ISIL fighters around the town of Bazaa, northeast of al-Bab, the Observatory said. Turkish-backed forces had briefly captured the town before suicide bombers pushed them out on Saturday.

Al-Bab is 40km northeast of Aleppo, where the government defeated rebels in December - its most important gain in the nearly six-year-old war.

Northern Syria is one of the most complicated battlefields of the multi-sided Syrian war, with ISIL now being fought there by the Syrian army, Turkey and its rebel allies, and an alliance of US-backed Syrian militias.

If a clash does occur, it would be the first time Syrian government forces have confronted the Turkish army on the ground in northern Syria since Turkey launched its operation.

OPINION: Operation Euphrates Shield - Progress and scope

Russia, Assad's most powerful ally, has carried out air strikes targeting ISIL in the al-Bab area in support of both sides, underlining big shifts in the diplomatic landscape.

As relations between Russia and Turkey have improved, the two countries brokered a shaky ceasefire in December between the Syrian government and rebel groups fighting to unseat Assad.

An official from one of the Turkmen rebel brigades backed by Turkey said the presence of Russian forces could help prevent a confrontation.

"There are Russian soldiers along with the regime forces who are leading the way and that is an element that could satisfy Turkey," the rebel official told Reuters. "I don't expect clashes."