“No, Abu Bakr, leave it alone!” A woman shouts at her five-year-old son as he reaches out to pet a chicken that is penned into the corner of the warm, filthy room by jerry cans filled with water.

Curly haired Abu Bakr ends up being roughly pulled away by his mother, 20-year-old Lebanese Nour al-Huda.

The eldest of four – soon to be five, as Nour is pregnant – scowls but does as he’s told. He’s nicknamed for the leader of Isis, Nour explains, before reflecting on the reason the chicken is there.

“I am going home in two days,” she says, clearly delighted. “Maybe we’ll have the chicken to celebrate.”

Her friend Fatima*, a Syrian with freckles and beautifully mascara’d eyelashes, draws a finger slowly across her veiled neck, miming a beheading. “Let’s slaughter it Isis-style,” she says mischievously, at which Nour suffers from a laughing fit so severe she has to hug her growing belly.

Nour looks much younger than 20. Although it may be expected that a girl who got married at 14 – and then lived in the capital of Isis’s caliphate for three years – will look and act older than her real age.

Her cheerfulness is not at all in keeping with the unpleasantness of the internally displaced persons (IDP) camp she lives in or the experiences that have shaped her life so far, although that might be because she’s just had good news. Jilad, the camp’s leader, said on Thursday that Nour’s father had managed to arrange for his daughter and grandchildren to rejoin the family across the border in Lebanon.

The news makes Noor much luckier than the 15 other “Isis wives”, as they are called by the rest of the residents of the IDP camp in Ain Issa, 45 miles (72km) north of Raqqa.

Once the impenetrable heart of the so-called Isis caliphate across Syria and Iraq, since the US-backed joint Arab-Kurdish campaign to drive fighters out of the city began in earnest in June, Isis has been greatly weakened in Raqqa.

Retreating jihadists leave improvised explosive devices (IEDs) and a sniper rear guard as they consolidate their shrinking territory under the constant threat of US-led coalition air strikes. Most fight to the death, some are captured: almost all leave behind brides and children.

Unsure with what to do with the fighters’ families, officials at the Ain Issa camp have separated the “Isis wives” from the rest of the residents, in a small compound accessed through the head office. Since Syria’s war began in 2011, the town has passed from the hands of the Syrian government, to Free Syrian Army rebels, to Isis, to the control of the Kurdish-backed Raqqa Civic Administration. Once upon a time it was a regime cotton plant site, according to the sign that still hangs above the gated entrance.

In the room in which we are talking there is a plastic picnic table piled high with nappies and other baby essentials, thin mattresses for sitting and sleeping and next to nothing else. A very small baby sleeps face down on one of them, next to Nour, while older children play and fight almost on top of him.

Outside in the open-air corridor it is even more chaotic. The 16 women and their 32 children all live in just three rooms and a small concrete courtyard. It’s hot, dirty, and noisy as women shout at each other and their kids.

Nour was 17 when she arrived in Syria. She has been widowed twice since (Bethan McKernan ) (Bethan McKernan)

Several foreigners are among them, including a strawberry-blonde Turkish woman and a new arrival originally from the Netherlands. One blue-eyed woman nurses her half-Indonesian baby; the mix of languages and ethnicities could double as a diversity poster if not for the intense poverty, borne of an evil experiment.

Most of the women tell a similar story: the caliphate wasn’t what they thought it would be. The wives claim their husbands were tricked into moving to Syria, or they were otherwise misled themselves. Without papers, proof or a trial for obvious wrongdoing, however, the foreign women in particular find themselves in a stateless legal loophole, detained against their will.

One of their curious band – a dual French-Moroccan national– managed to leave the camp last week. She may have been rescued by the French embassy, but that seems unlikely given that France expects French female Isis members captured during the battle for Mosul to face trial in Iraq rather than be extradited home. Most of those remaining think she has ended up detained elsewhere.

Nour, from Tripoli, in northern Lebanon, is no different to her new-found sisters – except that she may really be going home.

“I was only 17 when I came here,” she complained, twisting her thick mousey hair into a plait, then unbraiding it, then plaiting it again. “I was a kid, what did I know?”

Moving to Syria had been her late first husband’s idea, Nour said. He was killed fighting in 2015; when pressed, she said she is not sad about his death.

Since Isis generally doesn’t tolerate singleness or widowhood in child-bearing women, pressuring them into remarrying, she quickly married a second husband – a Tunisian.

He was also killed defending Isis’ disintegrating caliphate. Although he is father to her youngest, and the baby she has on the way, Nour only speaks of him as “the Tunisian”, laughing when asked if she had any feelings for him at all.

“Khalas,” she says, the versatile word in Arabic for something that is irreversibly done or over. “What does it matter? He’s dead, and I’m going home.”

Nour is vague on the details of how her family has managed to secure her return. It appears she doesn’t really understand what’s happening – only that her father has somehow found her safe passage through President Bashar al-Assad’s territory to Lebanon, or across the Kurdish-claimed areas of northern Syria to the Iraqi border.

The arrangement is unheard of, although the camp manager confirms it’s happening. It remains to be seen whether the deal will work.

“I’ll see you in Beirut,” I say, tucking a piece of paper with her father’s name and address into a shirt pocket.

Nour claps her hands with excitement. “Yes! Like on Arab Idol. They say that at the end when a contestant gets through to the next round. God knows I’ve missed TV.

“And my father. And my brothers,” she adds in the next breath. “I probably should have said I missed them more first.”