ANKARA/AMMAN (Reuters) - Turkish forces struck dozens of Syrian government targets in northwestern Syria on Monday after five Turkish soldiers were killed in an attack on a military base in Idlib province, the Turkish defense ministry said.

The base at the town of Taftanaz was attacked a week after eight Turkish military personnel were killed by Syrian shelling in Idlib following Turkey’s deployment of thousands of troops to stem a Syrian government offensive in the rebel-held region.

Hitting back after Monday’s attack, in which five Turkish solders were also wounded, Turkish forces fired on 115 Syrian government targets and destroyed 101 of them, including three tanks, two mortar positions and one helicopter, the defense ministry said in a later statement.

The incidents are among the most serious confrontations between Turkish and Syrian troops in nearly nine years of conflict in Syria, and Turkey has said it will drive back Syrian forces if they do not pull back by the end of this month.

“Their attacks against our posts have made an operation necessary,” Omer Celik, spokesman for President Tayyip Erdogan’s AK Party, told reporters in Ankara.

The rapid advance by Syrian government forces in Idlib, the last major enclave of insurgents opposed to President Bashar al-Assad, has driven nearly 700,000 people from their homes toward the closed-off Turkish border.

Turkey, which already hosts 3.6 million Syrian refugees, says it cannot absorb any more and is ready for military action to halt the Syrian government advances.

It has poured 5,000 troops and convoys of military vehicles across the border, carrying tanks, armored personnel carriers and radar equipment to bolster its existing military positions.

A Turkey-backed Syrian rebel commander said the insurgents had also launched a military operation near the town of Saraqeb, south of Taftanaz, with Turkish artillery support.

‘WAR OF ATTRITION’

As the conflict escalated in Idlib, Turkish and Russian officials met in Ankara for talks.

Turkey and Russia are on opposing sides in the fighting in Idlib although they collaborate for a political solution to the conflict in Syria, and Moscow’s military intervention in 2015 helped swing the war decisively in Assad’s favor.

The Turkish presidency said a visiting Russian delegation was told the attacks against Turkish troops were “unacceptable”, must be stopped immediately and would not remain “unanswered”.

Russia and the Syrian government say they are fighting terrorists in Idlib, which is largely controlled by jihadist fighters.

“This is a war of attrition between Moscow and Ankara in which they are testing limits,” said Galip Dalay, a visiting scholar at Oxford University.

While there was a risk that the crisis could escalate further, Dalay said it could be managed with agreement between Ankara and Moscow on a buffer zone on the Syrian side of the border with Turkey, where displaced people could shelter.

But the challenge of meeting the needs of the wave of uprooted people is growing daily.

“Since 1 December some 689,000 women, children and men have been displaced from their homes in northwest Syria,” said David Swanson, a U.N. humanitarian spokesman. “That’s more than 100,000 people in just over a week.”

Swanson said the latest upheaval compounded an already dire humanitarian situation in Idlib, where 400,000 people were displaced between April and August last year by earlier fighting, many of them multiple times.