BEIRUT, Lebanon — After six days of deadly battles, the Kurdish-led militia that had been battling Islamic State fighters for control of a prison in northeastern Syria regained full control on Wednesday after its forces besieged the remaining militants into surrender, three militia officials said.
“In the end, they had no choice but to surrender or they would all die, so they decided to surrender,” said Siyamend Ali, one of the officials.
The reassertion of control by the Kurdish-led militia, the Syrian Democratic Forces, brings to an end one of the most audacious attacks by Islamic State fighters since the collapse of their so-called caliphate nearly three years ago.
The prison, in the city of Hasaka, held thousands of ISIS members taken captive as the caliphate fell apart as well as about 700 boys whose families had joined the Islamic State. S.D.F. officials deemed them dangerous, but human rights activists said their detention could violate international law and could potentially radicalize them, creating a new generation of jihadists.
The United States, which leads an international military coalition that partnered with the S.D.F. to fight the Islamic State in Syria, backed the Kurdish force in the prison battle, using armored vehicles, attack helicopters and airstrikes.
S.D.F. officials acknowledged Wednesday that instead of just taking over part of the prison, as an S.D.F. spokesman had said, the militants had joined with rioting prisoners to take over the entire prison complex.
ISIS’s attack on the prison, an effort to free the group’s fighters held there, was one of several recent military operations illustrating that it has again become a potent regional threat.
“This is not a problem solely within this city,” Maj. Gen. John W. Brennan, Jr., the coalition commander, said in a statement. “This is a global problem that requires many nations to come together to develop an enduring long-term solution.”
Using an Arabic acronym for the Islamic State, he said, “The makeshift prisons throughout Syria are a breeding ground for Daesh’s failed ideology.”
The militants attacked Thursday with two suicide car bombs on the entrance. Scores of armed fighters entered the complex, joining their detained comrades and burning plastic and blankets, S.D.F. officials said.
ISIS sleeper cells in surrounding neighborhoods also attacked the S.D.F., so its forces had to secure those areas before it could get to the prison.
For the last two days, S.D.F. forces imposed a siege on a handful of wards where prisoners and attackers had refused to surrender and were holding prison workers and the 700 boys hostage.
By Wednesday, the militants were running low on food and water and had no way to treat those who had been wounded in the fighting, so they surrendered, said Nuri Mahmud, an S.D.F. official.
S.D.F. officials posted images of scores of men who appeared to be prisoners lined up in the prison yard after surrendering on Wednesday.
They said they had not yet been able to assess the situation of the boys who had been held hostage. But their forces had known which building the boys were in and did not use heavy weapons near it.
“ISIS tried to take advantage of the youths in the prison to a certain extent,” Mr. Mahmud said. “The forces were careful about that.”
The officials said they were still trying to determine how many of their fighters and how many ISIS attackers and prisoners had been killed. During the battles, videos circulated on social media showing dead bodies strewn around the prison and an S.D.F. spokesman said at least 30 S.D.F. fighters and more than a hundred militants had been killed.
It also remained unclear how many prisoners had escaped.
The prison lies in a predominantly Kurdish region of northeastern Syria outside the control of the Syrian authorities in Damascus. The Kurdish-led S.D.F. fought alongside the United States to help drive ISIS from the region in 2019 and has since maintained a wide measure of autonomy there.
The United States still has a base at Hasaka with about 700 troops, and a smaller base near the Jordanian border in the south.
Hwaida Saad and Asmaa al-Omar contributed reporting.