Syrian government forces in Idlib must pull back behind a line of Turkish observation posts by the end of this month, Turkey's President Tayyip Recep Erdogan has said, warning that if they did not do so, Ankara would drive them back.

Speaking two days after eight Turkish military personnel were killed by shelling in the region, prompting a Turkish military response, Erdogan said two of the Turkish posts were now behind the Syrian government front line.

More:

"If the Syrian regime will not retreat from Turkish observation posts in Idlib in February, Turkey will be obliged to take matters into its own hands," Erdogan told his party's legislators in parliament.

"Turkey's air and land forces will move freely in all operation areas [in Syria] and in Idlib, and they will conduct operations if needed," he added.

Turkey, which backs certain opposition groups in Idlib, has set up 12 observation posts in the last rebel-held stronghold in Syria as part of a 2018 deal with Russia, a major backer of Syrian President Bashar al-Assad.

Erdogan said the Syrian government is violating the ceasefires reached in Idlib, calling Monday's attack that killed seven Turkish soldiers and one civilian contractor a "turning point in Syria for Turkey".

In response, Turkey said it struck more than 50 targets and killed 76 Syrian government troops.

Idlib has been a stronghold of opposition and anti-government armed groups since the outbreak of the Syrian war in 2011.

It is currently home to some three million civilians, half of whom were transferred there en masse from other parts of Syria that were recaptured by al-Assad's forces.

Turkey and Russia agreed in September 2018 to turn Idlib into a so-called de-escalation zone where acts of aggression are expressly prohibited.

The Syrian government and its allies, however, have consistently broken the terms of the ceasefire - including a fresh ceasefire that started on January 12 - launching frequent deadly attacks inside the zone.

"From now we will not turn a blind eye to any step that constitutes the violation of the agreements," Erdogan said.

Since hostilities intensified in the so-called "de-escalation zone" in Idlib on April 29, United Nations monitors have verified incidents in which 1,506 civilians, including 293 women and 433 children, were killed, UN human rights spokesman Jeremy Laurence said last month.

Meanwhile, the UN's regional spokesman, David Swanson, said on Tuesday that some 520,000 people had been displaced since the beginning of December and the numbers could swell further.

He added that the latest wave of displacement compounded "an already dire humanitarian situation" that saw more than 400,000 people displaced from the end of April through the end of August, many of them multiple times.