Turkey's president threatened Wednesday to use force against Syrian government forces if they don't pull back to an earlier cease-fire line in northern Syria by the end of the month.

Recep Tayyip Erdogan's remarks to members of his ruling party followed rare direct clashes Monday between Turkish and Syrian troops inside Syria, which killed several Turkish and Syrian personnel.

Syrian President Bashar Assad’s forces have been advancing deeper into the northwestern province of Idlib, the country's last rebel stronghold, since December. Turkey — a strong backer of some of the rebels — has a dozen military observation posts in Idlib province, which borders Turkey.

"If the (Assad) regime does not retreat to areas behind the observations posts, Turkey will be forced to take matters into its own hands," Erdogan said. He said two of the Turkish observation posts are now behind Syrian lines.

The observation posts were set up as part of an agreement reached in 2018 with Russia — a main supporter of Assad — to monitor a cease-fire that has since collapsed.

Erdogan said he told Russian President Vladimir Putin that the Syrian forces must retreat during a late-night phone call on Tuesday.

"This is a new era in Syria. Nothing can remain the same where the Turkish soldier's blood has been shed," he said, in reference to Monday's deadly clashes.

“If our soldiers' safety cannot be ensured in Idlib, no one can deny our right to ensure it ourselves,” he said.

Shelling by Syrian government forces killed seven Turkish soldiers and their civilian translator, while the Turkish retaliation killed at least 13 Syrian troops.

Erdogan also called for the withdrawal of Syrian Kurdish forces from regions near Turkey's border. He threatened to resume a Turkish military offensive that was launched into northern Syria last year against Kurdish militias there.

Breaking news and analyses in your inbox Email * Please enter a valid email address Sign up Please wait… Thank you for signing up. We've got more newsletters we think you'll find interesting. Click here Oops. Something went wrong. Please try again later. Try again Thank you, The email address you have provided is already registered. Close

Turkey regards the U.S.-allied Kurdish forces as terrorists because of their links to Kurdish insurgents across the border in Turkey. But the Kurdish-led forces inside Syria had also partnered with the U.S. as a valuable ally against the Islamic State group.