Kurdish forces have retaken full control of a prison in northeast Syria where IS jihadists had been holed up since attacking it six days earlier.
The brazen IS jailbreak attempt and ensuing clashes left more than 180 dead in the jihadists' most high-profile military operation since the loss of their so-called caliphate nearly three years ago.
Ghwayran prison in the city of Hasakeh held an estimated 3,500 IS inmates when the initial attack began on 20 January with explosives-laden vehicles steered by suicide bombers.
The Kurdish authorities have insisted no inmates escaped from the compound but the British-based Syrian Observatory for Human Rights monitoring group has said significant numbers got away.
"The entire prison is under our control ... and inmates are being transferred to a safe place," said Nowruz Ahmed, a top official with the Kurdish-led Syrian Democratic Forces (SDF).
Speaking during a press conference, she said combing operations in the area were still underway, adding that a 9,000-strong Kurdish-led force had taken part in efforts to retake the facility.
With US and other foreign forces stepping in to support Kurdish elite units, the neighbourhood around the prison was secured and the besieged militants inside the prison started turning themselves in.
The SDF, the semi-autonomous Kurdish administration's de-facto army, had said earlier on Wednesday that around 1,000 IS inmates had surrendered.
The Observatory, which relies on a network of sources inside Syria, confirmed that the attack was over, after nearly six full days that turned the largest city in northeast Syria into a war zone.
Mass surrender
Thousands of Hasakeh residents were forced to leave their homes after at least 100 IS fighters stormed the facility, in their biggest show of force in years.
In one mosque located at a safe distance from the chaos, hundreds of women and children were huddled together in the biting winter cold.
"We want to go back home," said Maya, a 38-year-old mother trying in vain to pacify her youngest child, adding that "there is no bread, water or sugar here".Fighting in and around the prison since Thursday killed 181 people, including 124 IS jihadists, 50 Kurdish fighters and seven civilians, according to the Observatory.
Fighters of Syria Democratic Forces (SDF) walk amid damage of Ghwayran prison in Hassakeh, northeastern Syria Source: EPA
That death toll could rise, however, as Kurdish forces and medical services gain access to all parts of the prison following the end of the attack.
A stand-off gripped the prison for days, with Kurdish forces and their IS foes aware they faced either a bloodbath or talks to end the fighting.
There were fears for more than 700 boys who were among those held in the facility.
Kurdish forces had cut off food and water to the jail for two days to pressure holdout jihadists to give themselves up, the Observatory said.
The SDF has been reluctant to refer to talks between them and IS fighters, and it remains unclear exactly what led to the end of the attack.
The self-declared IS caliphate, established in 2014 once straddled large parts of Iraq and Syria.
After five years of military operations conducted by local and international forces, its last rump was eventually flushed out on the banks of the Euphrates in eastern Syria in March 2019.