Kurdish-led forces have taken full control of al-Sina'a prison in Syria's north-eastern city of Hasaka, ending a week-long assault by extremists on the detention facility.
Spokesman Farhad Shami said all Islamic State militants had surrendered hours after 500 had given themselves up following clashes in some buildings.
It comes a week after a breakout by Islamic State prisoners left dozens dead, as IS fighters used vehicles and explosives to ram through the prison walls before entering the building with heavy machine guns.
There has been no update yet on the 850 children and minors, who lived alongside the nearly 5,000 prisoners in the overcrowded jail, that have been caught in the crossfire.
The Syrian Democratic Forces (SDF), aided by US troops, began to storm the prison on Monday.
British Special Forces and the US military had been involved in the operation to retake the prison, sources told Sky earlier this week.
Al-Sina'a is the largest prison facility where the SDF has kept thousands of detainees. The relatives of many say they were arrested on flimsy charges for resisting the SDF's forced conscription.
The Kurdish-led militia denies this.