Members of the Syrian Democratic Forces (SDF) deploy around Ghwayran prison in Syria s northeastern city of Hasakeh on January 25, 2022. AFP
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 "caliphate" nearly three years ago.
Gweiran prison in the city of Hasakeh was thought to hold around 3,500 IS inmates when the initial attack was first launched on January 20 with explosives-laden vehicles steered by suicide bombers.
The Kurdish authorities have insisted no inmates escaped from the compound but the Syrian Observatory for Human Rights monitoring group has said significant numbers were sprung.
In a statement, Farhad Shami of the Kurdish-led Syrian Democratic Forces (SDF) said days of operations had "culminated with our entire control" over the prison after all holdout IS fighters had surrendered.
With the 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 Wednesday that more than 1,000 IS inmates had surrendered.
The Observatory confirmed that the attack was over, after nearly six full days that turned the largest city in northeast Syria into a war zone.
Thousands of Hasakeh residents were forced to leave their homes after at least 100 IS fighters stormed the facility last Thursday, 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, adding that "there is no bread, water or sugar here".
Fighting in and around the prison since Thursday has killed 181 people, including 124 IS jihadists, 50 Kurdish fighters and seven civilians, according to the Observatory.
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 tense standoff has gripped the prison in recent days, with Kurdish forces and their IS foes aware they were facing either a bloodbath or talks to end the fighting.
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.
Observatory head Rami Abdel Rahman said a Syrian IS jihadist had negotiated with Kurdish forces to end the standoff and secure medical care for wounded jihadists.
Since Monday, Kurdish forces had freed at least 32 prison staff, some of whom appeared in video footage that IS had shared on social media after launching the attack.
Gweiran is the prison with the largest number of suspected IS members in Syria and many, from Kurdish officials to Western observers, have warned the jailbreak should serve as a wake-up call.
Kurdish authorities say more than 50 nationalities are represented in Kurdish-run prisons holding more than 12,000 IS suspects.
The Kurdish administration has long warned it does not have the capacity to hold, let alone put on trial, all the IS fighters captured in years of operations.
"This issue is an international problem," the administration's top foreign policy official, Abdulkarim Omar, told AFP on Wednesday. "We cannot face it alone."
He called on the international community to "support the autonomous administration to improve security and humanitarian conditions for inmates in detention centres and for those in overcrowded camps".
The proto-state declared by IS 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.