Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

ANKARA — Turkey's military will strike Syrian government forces by air or ground anywhere in Syria if another Turkish soldier is hurt, Turkish President Recep Tayyip Erdogan said Wednesday.

Erdogan said Turkey is determined to push Syrian government forces beyond Turkish observation posts in the northwestern Idlib region by the end of February, and he warned allied Syrian rebels not to give government forces an excuse to attack.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Violence has flared in Idlib, just south of Turkey's border, in recent weeks as government forces backed by Russia and Iran have made gains in their campaign to eliminate the last insurgent bastion after the country's nine-year war.

Turkish military vehicles in the town of Binnish in Syria's northwestern Idlib province on Feb. 12, 2020. Muhammad Haj Kadour / AFP - Getty Images

Turkey, which is allied with some rebel groups opposed to Syrian President Bashar al-Assad, mounted a counterattack Tuesday after 13 Turkish military personnel were killed by Syrian shelling in Idlib in the last 10 days.

"If there is the smallest injury to our soldiers on the observation posts or other places, I am declaring from here that we will hit the regime forces everywhere from today, regardless of Idlib's borders or the lines of the Sochi agreement," Erdogan said, referring to a 2018 cease-fire accord.

"We will do this by any means necessary, by air or ground, without hesitating, without allowing for any stalling," he told members of his AK Party in Ankara. Russia, which has an air base in Syria, has controlled Idlib's airspace for several years.

The Turkish military casualties have strained ties between Ankara and Moscow. The TASS news agency quoted the Kremlin as saying Russian President Vladimir Putin and Erdogan agreed in a phone call that the sides would continue contacts on Syria.

Erdogan said Turkish-backed rebels have mobilized to push Syrian government forces out of Idlib, but added they must remain disciplined.

"We have given the message that we will act without compromise to those from the opposition groups who act in an undisciplined way and give the regime an excuse to attack," he said.