Ankara, Turkey - Since last April, Syrian government forces have conducted an off-and-on military campaign to retake the final rebel stronghold in northwestern Idlib province. More than 1,000 civilians have been killed while hundreds of thousands of others have been displaced.

In the early hours of Monday, the offensive took a dramatic and potentially critical turn when forces loyal to President Bashar al-Assad killed eight Turkish military and civil personnel.

More:

"Since the start of the offensive, we've seen a cycle whereby the regime forces attack, Turkey complains and Russia intervenes to slow the attacks. Then the process starts again," said Ahmet Evin, a senior scholar at Sabanci University's Istanbul Policy Centre

"This time could be different because the killing of Turkish soldiers raises the stakes considerably."

The escalation has threatened to damage relations between Moscow and Ankara. Despite supporting opposing sides in the conflicts in Syria and Libya, the two countries have been moving closer in recent years with growing energy, defence and trade ties.

The Turkish deaths came on the eve of a visit to Ukraine by Turkish President Recep Tayyip Erdogan, who used the trip to call on Russia to honour the 2017 Astana agreement that seeks to pave the way for a political solution in Syria.

It also established a number of "de-escalation zones" in Syria, including Idlib province, which Ankara said have been violated by Assad's forces.

Even before the latest developments, Erdogan said Syrian government advances meant there was "no such thing as the Astana process any more".

Alexey Khlebnikov, a Middle East expert and Russian foreign policy analyst at the Russian International Affairs Council in Moscow, said Erdogan could be overestimating the Kremlin's power over al-Assad.

"Russia can't make Assad do whatever it wants," he said. "Moscow had significant difficulties with Damascus in the past and I don't see Moscow as being in full control of what Damascus is doing on the ground."

Ankara has also failed to follow the demands of Astana, such as separating "moderate" Turkey-backed fighters from radicals or preventing attacks on a Russian airbase, Khlebnikov added.

Deep ties

Despite the apparent fracture in Turkey-Russia relations, Ali Bakeer, an Ankara-based political analyst and researcher, said cooperation between them was deep enough to weather such a rift.

"There's a deep relationship between Turkey and Russia and they have common interests on many levels," he said. Among these ties are a Black Sea gas pipeline unveiled last month and an air defence deal that has caused concern among Turkey's NATO allies.

In particular, Erdogan and Russia's Vladimir Putin appear to have a good personal relationship, often referring to one another as "dear friend" when they meet. In a sign that the two countries were working to repair the damage from the latest escalation, they spoke directly on the phone on Tuesday.

In the call, Erdogan told Putin that the attack on Turkish military personnel had damaged joint peace efforts and that Turkey would defend itself in case of a similar attack, the Turkish presidency said.

In its report on the same phone call, the Kremlin said the leaders agreed to take immediate measures to improve coordination of their countries' actions in Syria.

Turkish Foreign Minister Mevlut Cavusoglu had already spoken with his Russian counterpart Sergey Lavrov on Monday. The following day Cavusoglu told a meeting in Ankara that the Astana process and last year's Sochi deal with Russia over Syria "did not disappear completely but the damage has started".

He added: "We want to give momentum to the political process as soon as possible, along with a permanent ceasefire and a constitutional commission. But there's no way we can tolerate attacks on us."

Regional cooperation

Turkish and Russian cooperation in northeast Syria, where Turkey's operation against Kurdish forces in October was brought to an end by Russian mediation, seemed to suffer a setback. Turkish broadcaster NTV reported that joint a Turkish-Russian patrol in the border region was cancelled on Monday.

"These two things are parallel," Khlebnikov said. "There may be some trade-off between Turkey and Syria over Idlib and the northeast, which is more important for Turkey."

Idlib is where opposition forces dominated by Hay'et Tahrir al-Sham, a former al-Qaeda affiliate, are making a last stand against government forces backed by Russian airpower. Among the anti-Assad fighters are groups backed by Turkey.

Under an agreement reached with Russia last year, Turkey has 12 military observation posts dotted around Idlib, some of which have become engulfed by al-Assad's troops.

The Turkish deaths happened near Saraqib, a town that lies at the junction of the strategically important M4 and M5 highways where Turkey deployed extra troops at the weekend.

Turkey responded with attacks on Syrian positions that, according to a war monitor, led to 13 Syrian fatalities. Turkey claimed to have "neutralised" - a term it applies to killed, wounded or captured enemies - more than 70 "regime members". The Syrian government made no immediate statements on any casualties.

As well as protecting the rebel groups that it backs, Turkey is concerned about hundreds of thousands of displaced civilians who, according to Erdogan, have fled towards the Turkish border to escape the Syrian assault.

Turkey is currently home to around 3.6 million Syrians and the presence of such a large refugee community has become a contentious domestic political issue.

"Turkey knows the inevitable outcome of Idlib falling is a fresh wave of refugees, which would cause problems for Erdogan domestically," said Kamal Alam, a UK-based military analyst who wrote a recent article on Turkey-Syria relations.

According to the Syrian Observatory for Human Rights, waves of civilians continued to flee their homes on Tuesday as regime troops pushed towards Idlib city and Russian jets bombed targets.

The UK-based war monitoring group said most were escaping towards the Turkish border or parts of Syria's Aleppo province under Turkish control while others were trying to cross into Turkey itself with the help of smugglers.