BEIRUT — Syrian troops backed by heavy airstrikes have edged closer to a hospital in northwestern Syria where dozens of Syrian soldiers and loyalist fighters have been holed up for the past two weeks, the army said Sunday.

An army source told Reuters that its troops were now a few miles away from the besieged hospital, the last remaining army foothold in the town of Jisr al-Shughour in the province of Idlib.

The town was overrun last month by insurgents, including al-Qaida’s wing in Syria, Nusra Front. President Bashar al Assad said Thursday that troops would head to the hospital on the outskirts of the town.

“Units of the army have encircled the terrorist groups in the vicinity of Jisr al-Shughour,” the army source said.

Rebels have so failed to storm the hospital despite repeated suicide bombings and intense mortar shelling from nearby positions. The compound is situated on a hilltop overlooking a main highway and has several underground levels that have sheltered the troops from the rebel shelling.

The UK-based Syrian Observatory for Human Rights, which tracks violence across the country, said insurgents got into one of the hospital buildings Sunday, after a suicide bomber from Nusra Front blew himself up at dawn. But pro-government sources said the army repelled the attack.

The Syrian army is determined to achieve a victory, to restore morale and regain momentum against the rebels, after losing Jisr al Shughour and on March 28 the provincial city of Idlib. Large parts of the rich agricultural province are now in rebel hands.

The army strategy is to keep the rebels, who are fighting to end Assad’s rule, from getting any closer to Latakia along the coast, the heartland of Assad’s minority sect, the Alawites.

The Observatory said at least 16 raids were conducted Sunday and two rebel sources said the army had been advancing slowly in the last few days nearer the hospital area.

“There are hundreds of raids and the bombing is not stopping. But God willing they will be defeated and we will move the battle next to their own areas,” Abu Obada, a rebel commander from Jaish al-Nasr, a coalition of rebel groups involved in the fighting, told Reuters via Viber.