ISIL militants regained control of Albu Kamal, their last stronghold in Syria, after Iranian-backed militias who claimed to have captured the city a few days earlier were ambushed and forced to retreat, tribal leaders, residents and a war monitor said on Monday.
Fighters from Lebanese Shiite group Hizbollah in Syria who joined forces with Iraqi Shiite fighters crossing the border into Syria were taken by surprise by militants hiding inside tunnels in the heart of the city they said they had taken on Wednesday, they said.
The Shiite fighters had launched a ground offensive on the city, in Syria's eastern Deir Ezzor province, after months of mainly Russian heavy bombardment against the city that killed dozens of civilians and caused widespread destruction.
"Islamic State militants began surprise attacks with suicide bombers and rocket attacks after the Iranian militias were duped that Daesh had left the city," said Qahtan Ghanam Al Ali, a tribal leader.
The Syrian army had on Thursday declared victory over ISIL, claiming it had killed many militants while scores surrendered. It said the capture of Albu Kamal marked the collapse of the militants' three-year reign in the region.
The army made no mention of the loss of Albu Kamal, but Hizbollah's media unit said intensive aerial strikes hit ISIL hideouts in the western countryside of the city.
The offensive was spearheaded by elite forces from Hizbollah fighting inside Syria alongside an array of Iraqi and Afghan Shiite militias that had entered from Iraq, a commander in that alliance told Reuters.
"These militant attacks lead to big human losses in the ranks of fighters supporting the regime," the UK-based Syrian Observatory for Human Rights said.
Albu Kamal, a major supply and communications hub for the ultra-hardline militants between Syria and Iraq, was a big prize for the Iranian-backed militias.
The militants' control of the city and its sister border town of Al Qaim on the Iraqi side had disrupted the strategic Baghdad-Damascus highway that had long been a major arms supply conduit by Iran to its Syrian ally.
On Sunday, jets believed to be Russian intensified their third day of bombing of Albu Kamal and its outskirts, with at least 50 civilians - mostly women and children - killed since Friday, the monitor and residents said.
In retaliation for their losses, Iranian militias who were forced to withdraw shelled villages east of the city where hundreds of families who fled Albu Kamal had found temporary refuge, the UK-based war monitor said.
In one air strike on the town of Sukariya, east of the city, at least 30 people were killed, mostly women and children from three families, two former residents of the city said.
Other aerial strikes hit villages of Marshada and Sousa near the river crossing where hundreds of civilians were targeted as they fled in boats and dinghies, they added.
Albu Kamal has been a target of intensive strikes believed to be conducted by Russia across Deir Ezzor province which has killed hundreds of civilians in recent months, according to the monitor and local figures.
Military experts and Syrian opposition figures said Russia has stepped up a "scorched earth" policy in the province with its aerial bombing in recent months to secure a rapid military victory at any price for its military and its allies.