ANKARA, Turkey — Syrian government troops captured a key opposition town in the northwest Wednesday, an observer group and a news network reported, despite threats by Turkey's president to use force if they don't pull back by the end of the month.

The Britain-based Syrian Observatory for Human Rights and an opposition news network said Syrian government troops entered Saraqeb in the evening after an intense day of clashes with opposition fighters, during which several Turkish posts were surrounded.

Syrian state-run TV reported that government forces encircled Saraqeb after advancing toward the town from three directions. Some opposition fighters were reportedly still in the town, while the opposition-run Shaam news agency said Syrian troops had not yet entered Saraqeb.

Syrian forces have fought to open a highway linking the capital, Damascus, with the northern city of Aleppo, Syria’s largest. Rebels have kept the highway shut down since 2012, and Saraqeb is the last major rebel-held town in their way. The town also sits at the intersection of another major highway that links eastern and western Syria.

Turkey, a strong backer of some rebel groups in northwest Syria, has a dozen military observation posts in Idlib province, which borders Turkey. In recent days, Ankara has sent new troops and equipment, setting up posts around Saraqeb in an attempt to keep it from falling into Syrian government hands.

Syrian President Bashar Assad’s forces have made advances into Idlib, the country’s last rebel stronghold, since December. The United Nations said more than 500,000 have been displaced because of the violence.

“If the [Assad] regime does not retreat to areas behind the observations posts, Turkey will be forced to take matters into its own hands,” Turkish President Recep Tayyip 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.

During their advance on Saraqeb, Syrian forces surrounded four Turkish observation points, the Syrian Observatory for Human Rights and news opposition sites said.

The opposition-run Baladi News Network also reported that the town fell into Syrian control, adding that Saraqeb came under intense Syrian and Russian fire. Clashes between government forces and opposition fighters continued east of the highway, north of Saraqeb, on Wednesday night. Syrian state news agency SANA reported that four civilians were killed in rebel shelling of an Aleppo city district that sits on the highway.