Isis militants withdrew on Thursday from their last stronghold in Syria, a strategic town near the border with Iraq, following a government offensive that has effectively left the extremist group’s fighters dispersed in villages in the desert.

The Syrian military declared the town of Abu Kamal liberated after intense battles that killed a large number of militants, including leaders. The military said they are still chasing other Isis militants in different directions in the desert.

“The liberation of Abu Kamal is of great importance because it is a declaration of the fall of this group’s project in the region generally and the collapse of its supporters’ illusions to divide it, control large parts of the Syria-Iraq borders and secure supply routes between the two countries,” said army spokesman General Ali Mayhoub in a televised statement.

Isis completely driven out of Raqqa by US-backed forces

Syrian pro-government media said Syrian troops had clashed with remnants of Isis militants in the town after they entered it late on Wednesday. On Thursday, they reported the town clear of Isis fighters.

Pro-Syrian media reported the town was liberated. Al-Ikhbariya TV’s journalist reported from the road to the town, joyfully breaking out on camera: “Daesh [Isis] is finished. Live.”

The UK-based Syrian Observatory for Human Rights said government forces and allied troops, including Iraqi forces who linked from across the border, are combing through Abu Kamal after Isis militants withdrew.

With the collapse of Isis in Abu Kamal, Isis militants have no major territorial control in Syria and Iraq, and are believed to have dispersed in the desert west and east of the Euphrates River. US officials have estimated that there were between 2,500 and 3,500 Isis militants around Abu Kamal, and that leading members of the group were also believed to have taken refuge in the town. The group has a small presence near the capital Damascus.

Isis has suffered consecutive defeats at the hands of separate but simultaneous offensives in Iraq and Syria by the Russian-backed Syrian forces and allied militias as well as US-backed Iraqi and Syrian fighters.

Despite its fall, the group’s media apparatus has remained active and its fighters are likely to keep up their insurgency from desert areas.

The swift fall of Abu Kamal in eastern Deir ez-Zor province was accelerated after Iraqi forces seized Al-Qa’im, the town across the border last weekend, also controlling a strategic crossing between the two countries.

A senior Iraqi official said there was an agreement on Tuesday to send Iraqi paramilitaries to Syria to take part in the Abu Kamal operation, adding that the Syrians were to supply them with weapons and gear. The official spoke on condition of anonymity because he was not authorised to speak to reporters.

An Iraqi spokesman for the Popular Mobilisation Forces said last week that his forces, part of the Iraqi security forces, will participate in the operation and will head north to protect the borders and secure the road from Iran to Lebanon.

Abu Kamal is the last urban centre for the militants in both Iraq and Syria where Syrian troops – backed by Russia and Iranian-supported militias – and US-backed Syrian Democratic Forces are vying for control of the strategic border town.

Washington is wary of increasing Iran influence in the area and has backed the SDF in their bid to uproot Isis from the borders with Iraq. The proximity of forces in the area has raised concerns about potential clashes between them as they approach Abu Kamal from opposite sides of the Euphrates River, and now from across the border with Iraq.

It was not clear if the government seizure of the town means the end of the race for control of territory previously held by Isis.

So far the Kurdish-led SDF have focused on the area east of the Euphrates, seizing a number of oil and gas fields and securing large swathes of areas along the border with Iraq, as well as the newly liberated Raqqa city.