The United Nations warned on Friday that escalating fighting in northwest Syria could end in a "bloodbath" as Turkish President Recep Tayyip Erdogan phoned Russia's leader to discuss the quickly deteriorating situation.

The Kremlin said Russian President Vladimir Putin and Erdogan agreed to intensify talks on Syria's Idlib region to reduce tensions and implement a ceasefire.

Putin told Erdogan he was "seriously concerned" by the "aggressive actions" of rebels in Idlib.

"The necessity of unconditional respect for the sovereignty and territorial integrity of Syria was underlined," the Kremlin statement said.

More:

Erdogan told Putin the solution was to return to the Sochi agreement they signed in 2018, which allowed Turkey to establish military posts across Idlib designed to prevent a Syrian government assault. That deal has been increasingly set aside as Syrian forces advance steadily into the region.

"The president during the call stressed that the regime should be restrained in Idlib and that the humanitarian crisis must be stopped," the Turkish presidency said in a statement after the two leaders spoke.

Erdogan also asked his French and German counterparts to provide "concrete" support in ending the burgeoning humanitarian crisis in Syria's Idlib region, Turkey's presidency said. Erdogan said attacks in Idlib - where a Russia-backed Syrian government offensive has displaced nearly one million people and brought Ankara, Moscow and Damascus to the brink of confrontation - must be stopped.

Idlib is the final stronghold of rebels fighting Syrian President Bashar al-Assad's government during a nine-year war that has killed hundreds of thousands of people and displaced millions.

Turkey, which backs some rebel groups in Idlib, has lost 16 military personnel this month in clashes with Syrian forces. It has bolstered its positions and called for Syrian forces to pull back.

With Ankara threatening an "imminent" operation against Syrian forces, Minister of Defence Hulusi Akar inspected troops gathered at the Syrian border on Friday.

Rebels fire a rocket at a position near the village of al-Nayrab, 14km southeast of Idlib city [Muhammad Haj Kadour/AFP]

'Relentless violence'

Some 60 percent of the 900,000 people who have fled their homes but are trapped in a shrinking space are children, the UN's office for humanitarian coordination spokesman Jens Laerke told a Geneva news briefing.

The "relentless violence" must stop before it degenerates into "what we fear may end in a bloodbath" for civilians, he said.

"In the freezing winter, many people have resorted to burning their spare clothes, pieces of furniture or other materials," said Laerke.

"The front lines and relentless violence continues to move closer to these areas which are packed with displaced people, with bombardments increasingly affecting displacement sites and their vicinity. We call for an immediate ceasefire to prevent further suffering."

UN Secretary-General Antonio Guterres said on Friday the "man-made humanitarian nightmare" in Syria's Idlib province must end now, but he did not offer any specific plan for curbing the bloodshed in the final rebel holdout.

"For almost a year we have seen a series of Syrian government ground offensives supported by Russian airstrikes. This month there have been repeated deadly clashes between Turkish and Syrian government forces," Guterres said.

"The message is clear: There is no military solution for the Syrian crisis. The only possible solution remains political."

No withdrawal

Two Turkish soldiers were killed and another five wounded in Syrian government air raids on Thursday in Idlib. More than 50 Syrian forces were killed in retaliation, Turkey's defence ministry said.

Erdogan said the French and German leaders had proposed to hold a four-way summit with Russia but Putin had not yet responded. He repeated Turkey was not withdrawing its forces from Idlib.

French President Emmanuel Macron and German Chancellor Angela Merkel "expressed their shared concern over the catastrophic humanitarian situation that civilians find themselves in and the risk of an escalation", a French presidency statement said.

Erdogan also said Turkey was continuing work setting up housing for Syrian migrants in a 30-35km (19-22 mile) "safe zone" in Syria along the border with Turkey.

Ankara and Moscow have accused each other of flouting a 2018 de-escalation agreement that allowed Turkey and Russia to set up observation posts in Idlib.

Turkey has said some of its posts in Idlib were surrounded by Syrian government forces.