Fighting raged for a third day on Saturday between the Islamic State group and Kurdish forces in Syria after IS attacked a prison housing jihadists, with the violence killing nearly 90, a monitor said.
The assault on the Ghwayran prison in the northern city of Hasakeh is one of IS's most significant since its "caliphate" was declared defeated in Syria nearly three years ago.
"At least 28 members of the Kurdish security forces, five civilians and 56 members of IS have been killed" in the violence, said Rami Abdel Rahman, head of the Syrian Observatory for Human Rights.
IS launched the attack on Thursday night against the prison housing at least 3,500 suspected members of the jihadist group, including some of its leaders, the Observatory said.
The jihadists "seized weapons they found" in the detention centre and freed several fellow IS fighters, said the Britain-based monitor, which relies on sources inside war-torn Syria for its information.
Hundreds of jihadist inmates had since been recaptured but dozens were still believed to be on the loose, it added.
With the backing of US-led coalition aircraft, Kurdish security forces have encircled the prison and are battling to retake full control of surrounding neighbourhoods, which jihadists have used as a launching pad for their attacks.
The Kurdish-dominated Syrian Democratic Forces (SDF) on Saturday said "fierce clashes" broke out in neighbourhoods north of Ghwayran, where it carried out raids and killed more than 20 IS fighters.
It said it seized explosive belts, weapons and artillery held by jihadists.
Witnesses said they saw Kurdish fighters raiding homes in the flashpoint area near the jail in search of militants while coalition helicopters flew overhead.
In one location, Kurdish fighters gathered around five bloodied corpses of suspected IS fighters that had been placed along the roadside, the correspondent said.
The battles have triggered a civilian exodus from neighbourhoods around Ghwayran, with families fleeing for a third consecutive day in the harsh winter cold as Kurdish forces closed in on IS targets.
"Thousands have left their homes near the prison, fleeing to nearby areas where their relatives live," said Sheikhmous Ahmed, an official in the semi-autonomous Kurdish administration.
But not all the displaced had a safe haven.
"We don't know where we are going," said Abu Anas, who was forced out of his home on Saturday.
"We have no one but God," he said as he walked out of his neighbourhood with his wife and four children.
IS has carried out regular attacks against Kurdish and government targets in Syria since the rump of its once-sprawling proto-state was overrun in March 2019.
Most of their guerrilla attacks have been against military targets and oil installations in remote areas, but the Hasakeh prison break could mark a new phase in the group's resurgence.
IS said in a statement released on Friday by its Amaq news agency that the attack on the jail aimed to "free the prisoners".
It was not immediately clear whether the prison break was part of a centrally coordinated operation - timed to coincide with an attack on a military base in neighbouring Iraq - or the action of a local IS cell.
Analyst Nicholas Heras of the Newlines Institute in Washington said the jihadist group targeted the prison to bolster its numbers.
The Islamic State group "wants to move beyond being the terrorist and criminal network that it has devolved into, and to do that it needs more fighters," he said.
"Prison breaks represent the best opportunity for ISIS to regain its strength in arms, and Ghwayran prison is a nice fat target for ISIS because its overcrowded," he said, using another acronym for IS.
The Kurdish authorities have long warned they do not have the capacity to hold, let alone put on trial, the thousands of IS fighters captured in years of operations.
According to Kurdish authorities, more than 50 nationalities are represented in a number of Kurdish-run prisons, where more than 12,000 IS suspects are now held.
Many of the IS prisoners' countries of origins have been reluctant to repatriate them, fearing a public backlash at home.
Abdulkarim Omar, the semi-autonomous administration's top foreign policy official, blamed the prison attack on the "international community's failure to shoulder its responsibilities".
The war in Syria broke out in 2011 and has since killed close to half a million people and spurred the largest conflict-induced displacement since World War II. (AFP)