Syrian government forces have captured a strategic rebel-held town in the country's northwest amid a Russia-backed military offensive that has displaced hundreds of thousands of people fleeing to safer areas.

Maaret al-Numan, a former anti-government protest hotspot which has turned into a ghost town after months of bombardment, lies on a key highway connecting the capital, Damascus, to Aleppo.

More:

"Our forces managed in the past few days to stamp out terrorism in many villages and town", including Maaret al-Numan, an army spokesman said in a televised statement on Wednesday.

The army was bent on "hunting down all remaining armed terrorist groups until all Syrian soil has been cleansed of terrorism", he added.

In 2011, Maaret al-Numan was one of the first towns in Idlib province to rise up against President Bashar al-Assad's rule, and the following year, it was captured by rebels fighting against his forces.

Syrian government forces backed by Russian airpower have stepped up the campaign to take control of the province, the last rebel stronghold where millions took refuge after fleeing other parts of Syria earlier in the war.

The UK-based Syrian Observatory for Human Rights, an opposition war monitor, said rebel fighters withdrew from the town late on Tuesday.

Syrian troops had left a road west of the town opened apparently to give a chance for fighters to pull out and to avoid street battles inside the town.

The push into Maaret al-Numan came as Syrian forces were also advancing against rebels west of the city of Aleppo, according to state media and opposition activists.

Erdogan accuses Russia of 'not honouring' deals

Tens of thousands of civilians have fled the government's advance into the south of Idlib province, seeking safety closer to the Turkish border further north.

Aid groups have warned the latest violence is only compounding one of the worst humanitarian disasters of the nearly nine-year war, which has killed hundreds of thousands of people and displaced half of the country's population.

Al Jazeera's Sinem Koseoglu, reporting from Istanbul, said those displaced by the government's renewed offensive had already begun heading north.

"The displacement has been ongoing for many months and it has recently been on the rise," she said.

"[Those fleeing] believe that the Turkish side of the border is much safer. There is not enough space left [on the Turkish side], especially around the Atma camp in northern Syria."

Turkey, which backs some rebel groups opposed to al-Assad, already hosts more than 3.5 million Syrian refugees, and fears millions more could soon cross the border.

Meanwhile, Turkish President Recep Tayyip Erdogan on Wednesday said Russia was not abiding by past agreements regarding Idlib, adding that Ankara made it known to Moscow it was running out of patience with regards to the continuing bombardment.

"There have been agreements made with Russia. If Russia honours these agreements, we will do the same. But right now, unfortunately, Russia is not honouring these agreements," Erdogan was quoted as saying by Hurriyet daily.