Soon after the convoy of fighters - waving Syrian flags and brandishing weapons - entered Afrin, Syrian state media reported that Turkey had targeted them with shellfire.

The confrontation pits the Turkish army and allied Syrian rebel groups directly against the military alliance backing the government of President Bashar al-Assad, further scrambling northwest Syria's already messy battlefield.

Turkey's month-old offensive is aimed at driving the Kurdish YPG militia, which it sees as a big security threat on its border, from Afrin.

The YPG hailed the arrival of the pro-government forces - which included militias allied to Assad but not the Syrian army itself - and said Damascus had heeded its call for help against Turkey.

On Sunday, a Kurdish official said there was a deal with Assad's government for the army to enter Afrin and deploy along the border, but that the agreement did not extend to political relations between Damascus and the YPG.

The two sides each hold more ground than any other in Syria, and though they have mostly avoided direct conflict during the war, they have rival visions for Syria's future.

Earlier on Tuesday, Turkish President Tayyip Erdogan said Ankara had worked with Russia to prevent any deployment by pro-Syrian government forces.

On Monday, Turkey warned it could confront government forces if they entered Afrin to help the YPG, but added it would not stand in the way if they entered to clear the Kurdish militia from the region.