* Turkey, Russia agreed in 2018 on de-escalation zone
* Syrian government offensive upsets the fragile pact
* Ankara threatens to strike back against Syrian forces
* Syrian forces control key highway in the region
* Erdogan threatens to drive back Syrian forces unless they withdraw (Adds Erdogan comments)
By Tuvan Gumrukcu and Polina Ivanova
ANKARA/MOSCOW, Feb 15 (Reuters) - Turkey dismissed on Saturday Russian accusations that it has flouted de-escalation agreements with Russia and Iran in Syria's Idlib province, and threatened to take military action in the area if diplomatic efforts with Moscow fail.
Turkey and Russia, which back opposing sides in Syria's war, agreed in 2018 to set up a de-escalation zone in the northwestern province. But their fragile cooperation has been disrupted by a Syrian government offensive in Idlib, in which 13 Turkish soldiers have been killed in the past two weeks.
Ankara has said it will use military power to drive back the Syrian forces unless they withdraw by the end of February, and President Tayyip Erdogan has said Turkey will strike government forces anywhere in Syria if another Turkish soldier was hurt.
Erdogan discussed the situation in separate phone calls with Russian President Vladimir Putin on Wednesday and U.S. President Donald Trump on Saturday, but there was no immediate word of a diplomatic breakthrough.
Russia, which backs Syrian President Bashar al-Assad, says Turkey, which has poured military forces into Idlib, has aggravated the situation and failed to neutralise militants there.
But Turkey blames the situation on the advances by Syrian government forces in Idlib.
"We cannot overlook the cruelty happening in our neighbour," Turkish Vice President Fuat Oktay told broadcaster NTV. "Turkey has fulfilled its responsibilities in Idlib."
Foreign Minister Mevlut Cavusoglu said Turkey wanted to resolve matters with Russia over Idlib through diplomacy. But, speaking during an international security conference in Munich, he added: "If it won't work through diplomatic channels, we will take the necessary steps."
Ankara has been angered by the seizure by Syrian government forces of Turkish military observation posts established in Idlib under the 2018 deal.
"It is impossible for us to remain silent against their siege. We are doing what is necessary against them," NTV quoted Erdogan as saying on a flight back from Pakistan.
Erdogan also chided the United States, a NATO ally, saying U.S. statements of support did not instil trust.
Speaking in Istanbul later on Saturday, Erdogan again said Turkey would drive back Syrian forces unless they withdrew to the borders outlined by Ankara and Moscow in 2018. But he also appeared to bring forward his end-of-February deadline.
"The solution in Idlib is the (Syrian) regime stopping its hostility and withdrawing to the borders in the agreements. Otherwise, we will handle this before the end of February," Erdogan said.
"We would like to do this with the support of our friends. If we have to do it the hard way, we are also up for that," he said, apparently referring to Ankara's Western allies.
"Until we clear Syria of terrorist organisations and the cruelty of the (Syrian) regime, we will not rest easy."
Despite the tough rhetoric, Russian and Turkish officials are talking behind the scenes. Turkish and Russian officials held talks in Ankara on Saturday and Cavusoglu said a Turkish delegation would go to Moscow on Monday for talks.
Cavusoglu also had talks with Russian Foreign Minister Sergei Lavrov in Munich on Saturday - the first ministerial level meeting between Ankara and Moscow since the situation deteriorated in Idlib.
Cavusoglu tweeted that he had a "positive meeting" with Lavrov but that Turkey would not be "making an evaluation" until after Monday's talks in Moscow. Lavrov said Russia had very good ties with Turkey, but the sides did not always agree on issues.
Cavusoglu was also quoted by Russian news agencies as saying differences over Syria should not affect Ankara's relations with Moscow or disrupt a contract for the purchase of Russian S-400 missile defence systems which has strained Turkey's ties with Washington.
Erdogan said his phone call with Putin - his second since the Turkish troops were killed - had been positive and that statements by other Russian officials that criticised Turkey did not reflect the tone of the call.
However, Erdogan later criticised Russia for its support of Assad in the conflict: "Russia's efforts to capture land for a regime that is the enemy of its own people is nothing more than extending its life through a respirator. Soon even a respirator won't work and, God willing, the regime will suddenly turn into a corpse."
In the conflict in Syria, which began in 2011, Turkey has supported rebels looking to oust Assad. Erdogan said this week the Turkey-backed rebels launched an offensive to retake some areas they had lost to Syrian forces.
State-run Anadolu news agency said buses carrying commandoes and trucks with more military equipment had been sent to reinforce the Turkish observation posts.
The increased violence in Idlib has caused hundreds of thousands of people to abandon their homes and head north to the Turkish-Syrian border. Turkey, which hosts 3.6 million Syrian refugees, has said it cannot handle a new influx.
Syrian state media said Syrian troops had began clearing barricades from a highway between Damascus and Aleppo after recovering full control of the road for the first time in more than seven years.
Syrian state media also reported advances by Syrian government forces towards rebel-held Atarib, some 24 km (15 miles) west of Aleppo, and three towns to its northwest.
On Friday, Turkish and Syrian state media reported Turkish-backed Syrian rebels shot down a government helicopter west of Aleppo in the Idlib region. (Additonal reporting by Tom Perry in Beirut and Umit Bektas in Istanbul; Editing by Edmund Blair, Helen Popper and Timothy Heritage)
Our Standards: The Thomson Reuters Trust Principles.