BEIRUT -- In the sprawling al-Hol camp in northeastern Syria, Islamic State wives and widows have set up special courts, stabbed to death at least two people accused of apostasy and wielded knives and pistols in clashes with their Kurdish guards.

Now, as Turkish troops invade northern Syria and the U.S. abandons its Kurdish allies, there are renewed fears of a prison break in the camp that could give new life to the extremist group.

The Kurdish-led Syrian Democratic Forces, who captured much of northeastern Syria from IS with close U.S. military support, are mobilizing to stop the Turkish invasion and say they may not be able to spare enough forces to secure al-Hol, home to tens of thousands of IS-linked women and their children, and other detention camps holding more than 10,000 male militants, including some 2,000 foreign fighters.

Islamic State leader Abu Bakr al-Baghdadi, who remains at large, called on his supporters last month to attack the camps and set the detainees free.

Turkey views the Kurdish fighters as terrorists because of their links to the Kurdish insurgency in its southeast. President Donald Trump moved U.S. troops aside over the weekend to allow for the invasion, and said Turkey would take charge of the IS prisoners, including those Western countries refuse to repatriate out of security concerns. The U.S. is also planning to relocate dozens of the most feared IS prisoners to detention facilities in neighbouring Iraq, according to Iraqi officials.

The al-Hol camp is some 50 kilometres (30 miles) from the Turkish border, outside the "safe zone" Turkey plans to set up in northern Syria. But as the fighting worsens, there is a heightened risk that large numbers of detainees could escape. Al-Baghdadi himself was a former prisoner in Iraq, and jail breaks played a major role in the growth of IS after U.S. and Iraqi forces had nearly eliminated an earlier incarnation of the group a decade ago.

Dozens of camp residents attacked an exit gate in an apparent escape attempt before Kurdish security forces brought the situation under control, SDF spokesman Mustafa Bali said Friday. Video from a closed-circuit camera showed security forces chasing women in black robes through the centre of the camp.

"With increased SDF vulnerability, SDF control of al-Hol is likely to weaken and they will not co-ordinate with Turkey," said Lina Khatib, head of the Middle East and North Africa Program at Chatham House, a London-based think-tank . She said the SDF is already struggling to maintain order and that IS is likely to exploit the chaos unleashed by the Turkish invasion to mobilize prisoners.

------

KNIVES OUT

The Islamic State group lost its last foothold of territory in March, when the Syrian Kurdish forces captured the eastern village of Baghouz with U.S. support.

But inside the overcrowded and squalid al-Hol camp, the group's violent ideology is alive and well, and a new generation is being indoctrinated. The International Committee of the Red Cross says the more than 40,000 children in the camp "have experienced more violence, trauma and displacement in their short life than any of us can imagine."

Female IS members have turned one of their tents into a court administering the group's harsh interpretation of Islamic law. Last month, they found a 16-year-old girl guilty of apostasy. After the verdict was announced, women pulled knives from their all-enveloping black robes and stabbed her repeatedly. Kurdish guards evacuated her to a clinic where she later died, according to Abdul-Qader al-Ofeidly, commander of the Kurdish police force known as Asayish, which guards the camps. It was not clear what her nationality was.

He said she was one of several people attacked or killed by fellow detainees. A Syrian man with an amputated leg who moved about on crutches was also stabbed to death by female detainees after being accused of apostasy, the commander said.

Al-Hol is home to some 71,400 people, mostly wives, widows and children of IS fighters. They were swept up in the long and grueling military campaign that eventually dismantled the extremists' self-styled caliphate, which at its height in 2014 stretched across a third of Syria and Iraq. The SDF was a key U.S. ally in that effort and lost more than 11,000 fighters in battles with the extremists.

Most of the detainees at al-Hol are Syrian and Iraqi women and children. The stabbings took place in a highly-secured area known as the Annex that is home to some 10,000 hard-line IS supporters from other countries.

"Foreign women are trying to impose religious classes on all women in the camp," al-Ofeidly said.

On Oct. 1, police stormed a tent and rescued two women who had been sentenced to die and were about to be stabbed to death, he said, adding that IS supporters fought back with knives and pistols. He said another raid in September uncovered hand grenades and the body of a woman who was killed by other detainees and has yet to be identified. He said the foreign women are the main threat in the camp and echoed calls by Kurdish leaders for the detainees' home countries to take them back.

Western countries, including the United States, have refused to repatriate citizens who travelled to the Middle East to join IS, fearing they may not have enough evidence to convict them in criminal courts. The Kurds have long warned that they cannot hold the prisoners indefinitely, and now say their forces are stretched thin as they send reinforcements to the north. They have also halted operations against IS, which continues to stage attacks in Syria and Iraq.

------

'DEPLORABLE' CONDITIONS

Azadeh Moaveni, an analyst for the Crisis Group, a Brussels-based think-tank , visited the camp in late June. She said hard-line detainees were trying to maintain the cruel strictures of the caliphate inside the camp, including by whipping women who were caught smoking and encouraging their own children to beat up the children of those deemed unbelievers.

"The foreigner annex of al-Hol has been steadily violent much of the year, partly because it seems to hold a small core of organized and extremely militant women who plot and prey upon others, but also because conditions inside are so deplorable and tense," said Moaveni, who is also the author of a book about young women who travelled to the region to join IS.

Like many other detention camps in Syria and Iraq, al-Hol is overcrowded and reliant on international aid. Sewage runs through the muddy alleys, food is sometimes scarce and the water used for drinking and cleaning is contaminated.

Robert Onus, the emergency manager in Syria for Doctors Without Borders, known by its French acronym MSF, said the Oct. 1 shooting occurred after guards forcefully dispersed a protest over camp conditions held by women and children. He said MSF treated four women with gunshot wounds in the clinic it runs in the Annex, and that medics and patients took shelter from the gunfire.

"We are extremely worried about the well-being of the people held in the camp," Onus said. He said MSF was forced to temporarily reduce its activities and that other aid groups were struggling to deliver much-needed assistance to a "very vulnerable population."

Aid groups have warned that conditions in the camps could get even worse with the Turkish offensive, which has already caused tens of thousands of people to flee, including many who were displaced by earlier rounds of fighting.

Abdul-Karim Omar, who acts as foreign minister in northeastern Syria's Kurdish-led administration, says al-Hol is a "ticking bomb."