Ismail Zetouni / Reuters Minya Mesmer (R) is seen with her daughter at a military building in Misrata, Libya, November 6, 2016.

SIRTE, Libya, Dec 14 (Reuters) - One mild morning in October, when the roar of fighter jets over Sirte had died down and the crackle of gunfire had paused, Minya Mesmer decided to break free.

After 14 months as a slave in Libya, the 33-year-old Eritrean had to get away. She could no longer let her Islamic State captors rape, sell and exchange her or her 14-year-old daughter.

Her previous attempt to escape had left her with two broken legs. But she had healed enough to try again, she thought. She could lean on her daughter and limp past the cargo containers that marked the limits of Islamic State’s shrinking caliphate in the besieged city.

That morning, Mesmer (sounds like mess-mur) shared her plan with her daughter and another 16-year-old Eritrean girl. There were 22 other women holed up in the same building, all of them migrants enslaved by Islamic State. But Mesmer kept the others in the dark, worried that a large group would draw too much attention.

At around 9 a.m., Mesmer and the two girls walked out of the building, their slight frames draped in black abayas and their faces hidden behind niqabs.

Their captors were too distracted to stop them. Islamic State was four months into a vicious fight against pro-government Libyan forces, a war that had claimed hundreds of lives as it moved from neighborhood to neighborhood and door to door. The Islamist group was growing tired.

The women walked towards the front line along narrow roads flanked by collapsed buildings. Three blocks south, they came under fire, and ducked into an abandoned building to lie in wait.

“Let them kill us,” Mesmer told the girls. “It’s better than the life we’re leaving behind.”

Mesmer and the girls did not die. But their life would take a new, cruel, turn. The Libyan brigades they surrendered to that day have imprisoned them. After more than a year as Islamic Stateslaves, the women are accused of being part of the group.

African migrants fleeing their countries to seek freedom, peace or opportunity in Europe - some 175,000 this year alone - embark on a path of tribulation and likely death. Thousands perish crossing the Sahara Desert. Even more drown in the Mediterranean Sea after paying rich sums to smugglers who pack them into the bellies of dilapidated boats.

Less documented are the ones who get trapped in Libya, a land that, by dint of its location and its lawlessness, is the gateway to Europe from Africa. Here, their survival depends on the whim of warring factions.

As Reuters first reported in August, Mesmer and dozens of other women were captured and enslaved by Islamic State. They lived as chattel, human currency the extremist group used to draw fighters from the Middle East and Africa.

But when a ragtag army from the nearby city of Misrata launched an attack on Islamic State in May, the women’s captors could barely feed them. By October, they had become more of a burden than a prize, and their fallen value appears to have given them an opening to escape.

Far from finding liberation, however, the three dozen women and their children, most of whom are Eritrean, are living a new nightmare. They are being held in a military airbase in Misrata, alongside the wives and relatives of Islamic State fighters.

Brigadier Mohamed Gnaidy, an intelligence officer with the Misratan brigades who hold the women, says the military is investigating the escapees. This month, female suicide bombers blew themselves up after Misratan fighters granted them safe passage.

“They have to be under investigation because they fought for some time with Daesh,” Gnaidy said, using the Arabic acronym for Islamic State. He did not give details of the investigation. He said the women were being kept in a safe and comfortable place and would be deported if no terrorist links were found.

“We know they were forced to do this against their will,” he said. “But we’re investigating if any of them still espouse Islamic State’s ideology.”

Reuters could not visit the escaped women at the prison. But last month, a reporter obtained access to 11 of them, including Mesmer and her 14-year-old daughter, at a military post in Misrata. All but two of the women spoke on condition of anonymity to protect their families. Reuters is withholding the names of minors who say they were sexually abused.

The women looked emaciated. They said they had little food most days. The Misratan brigades expect them to pay for basic supplies, like soap, even though their money was confiscated, the women said. At least one woman is pregnant and in need of urgent care. They were not allowed to call their families. A United Nations representative visited the women last month to check on them. The U.N. declined to comment, but on Dec. 13, its Libya mission released a report that said “the situation of migrants in Libya is a human rights crisis.”

All of the women denied fighting on behalf of Islamic State or ever buying into its ideology. In one way, however, their lot under the extremists was better.

“When we were were with Daesh, yes, they cheapened our lives and humiliated us. But when it came to our basic needs, they treated us like kin,” a 42-year-old woman said.

Ismail Zetouni / Reuters

SEPARATION

Mesmer left Eritrea in December 2010 with her husband, Kiflay Dawit, and their four children. The two had met in junior high in Asmara, Eritrea’s capital, and were married before they graduated from high school. Dawit returned to school after their first daughter’s birth and later worked for a government-owned bank in the city. Mesmer stayed home to care for the family.

The couple set up a small convenience store in their neighborhood. Their oldest daughters thrived at school. But after local police jailed Dawit, twice, for speaking his mind at union meetings, they decided to leave the country.

The family walked for days and crossed Eritrea’s western border. They settled in the Shagarab refugee camp in Sudan. For two years, they lived on handouts from the U.N. refugee agency and earnings from a cafe Dawit set up on one edge of the sprawling camp.

One morning in December 2012, Mesmer woke to find her husband gone. Frustrated by life in the refugee camp, Dawit had paid smugglers to take him to Lampedusa, a small Italian island in the Mediterranean Sea. He had not told his wife his plans. And he did not say goodbye to his children.

“I didn’t have a choice. I left my children behind in the desert,” Dawit, now in Britain, told Reuters last month. “But every day and every night all I wanted was for their lives to be better than mine.”

Two years later, Mesmer also set off for Europe, using 40,000 Sudanese pounds ($6,172) she’d saved peddling tea and coffee to pay smugglers for the journey.

In July 2015, she traveled across the Sahara desert along with her four children and a caravan of about 100 migrants. In Ajdabiya, a town in northeast Libya where migrants stop to pay smugglers for passage through that country, they prepared for the truck journey to the capital, Tripoli.

But on the night of her departure, as Mesmer settled into the back of a truck, she found her oldest daughter was missing.

A Libyan smuggler had detained the girl and was demanding extra fees. Mesmer pleaded with him to let her daughter go. As he brandished a gun and threatened her, the truck departed with her three youngest children.

Mesmer settled the dispute with the smuggler, but then had to wait two weeks before she and her daughter could board a new truck headed for Tripoli.

The truck, crammed with 72 migrants in all, traveled four hours along the highway towards the capital before Islamic State fighters stopped it. The fighters separated the women and children and then took them to a compound in Harawa, a small town in central Libya.

Over the next few months, as Islamic State built its caliphate in Libya, its fighters forced the captive women to convert to Islam and, one by one, sold them as sex slaves.

Ismail Zetouni / Reuters The interior of a mosque where Eritrean migrants hid after escaping from Islamic State captors in Sirte, Libya, November 11, 2016.

“I AM THE OWNER”

Mesmer and her daughter made their first attempt to escape in January. Together with 14 other women, the pair managed to get away from the Harawa compound. But they were caught after a few days and returned to their prison.

In February, a middle-aged Saudi fighter called Abubeker bought Mesmer and her daughter. AnIslamic State commander had promised Mesmer that her daughter would not be sold to a different owner. But Abubeker ignored that.

“He told me ‘I am the owner. I will sell your daughter and no commander can tell me what to do,’” Mesmer said.

Mesmer tried to run away again. She fashioned a rope from hijabs, and in the early morning hours helped her daughter climb out of a third-floor window. But the improvised rope tore and her daughter fell and started bleeding. Mesmer jumped to the street below and broke both of her legs.

Abubeker moved his slaves to the ground floor so they would not jump again. A month later, he sold Mesmer’s daughter to a Sudanese fighter named Abu Telha.

For two weeks, Abu Telha raped the 14-year-old girl across the hall from her mother.

“I heard everything he did to my daughter. I heard her cry in her room and I cried in mine. I never imagined that my daughter would have to go through something like this,” Mesmer said. “But that was God’s plan.”

Abu Telha offered to marry Mesmer’s daughter. When she refused, he sold her to another Sudanese fighter called Mensur, who also raped her.

Mesmer’s agony was compounded because she did not know if her other children had survived their journey through Libya or had made it to Europe.

“I could not even remember what my children’s faces looked like anymore. I would see them in my dreams at night and I would be happy. But then I would wake up and I would still be with Daesh,” Mesmer said.

Reuters was unable to locate the three Islamic State fighters or independently confirm some parts of Mesmer’s account.

Ismail Zetouni / Reuters A former hostage of the Islamic State reacts at a military building in Misrata, Libya, November 6, 2016.

“TWO WARS”

In early May, Islamic State, emboldened by its state-building project in Sirte, ventured west and attacked checkpoints along a 250 km (155 mile) stretch to Misrata, Libya’s third-largest city.

The Misratan response was swift. The city’s war-hardened youth joined brigades in droves. Backed by a U.N.-installed government in Tripoli, the brigades pooled their weapons - old Russian rifles, T-55 tanks, and other arms from Muammar Gaddafi’s tenure - and took the fight to IslamicState.

But the Misratans’ zeal was matched by the tenacity of the hardline group’s skilled snipers and suicide bombers. The death toll climbed on both sides.

Then, in August, American fighter jets began bombing Sirte.

Before the airstrikes, the captive women lived in separate buildings in groups of three or four. But after civilians abandoned the city and the bombings became more frequent, Islamic State fighters rounded up the slaves and placed them in a medafa or guesthouse. They placed their wives in the same building so they could keep watch over the slaves.

The captive women said the fighters’ wives wore suicide belts and threatened to detonate the explosives. The wives taunted and threatened the captives. Airstrikes punctured each day.

When a slave’s owner died in the fighting, another fighter would take his place within a week. Some of the women said they were resold up to four times over the summer. The guesthouse became, in essence, a brothel.

“It felt like we were in two wars - one with the bombs and the incoming fire and the other with the Daesh men and their abuse,” Tigsti Fisahaye, a 24-year-old captive said. “The men expected us to die with them.”

Eventually, the fighters separated the two classes of women. They took the slaves to a building in a residential neighborhood called Number 3, one of the last Islamic State holdouts in Sirte. Each fighter would visit the building at night and take his slave with him. He would then rape her in buildings along the frontline and return her in the morning.

Ismail Zetouni / Reuters U.S. airstrikes have reduced some neighbourhoods in Sirte, Libya to rubble.

ESCAPE

By August, Islamic State’s caliphate had shrunk to a few city blocks. Resources dwindled and the women grew hungry. Their captors fed the women macaroni twice a day but the portions kept getting smaller. Some days, the women searched for food among the collapsed buildings. These scavenging tours doubled as reconnaissance missions.

With only a few blocks left under their control, the Islamic State fighters retrenched. They dug tunnels to hide from airstrikes. They moved the captives to a building closer to the shoreline. Because the fighter jets struck every moving vehicle, the women had to walk to their new prison. Mesmer tried to walk, too, in part to test her strength, but her feet could not carry her. She sent her daughter back to fetch the wheelchair she had used since February.

Her daughter had barely turned the corner when a fighter jet decimated the building the women had called home for a month. Three Islamic State snipers, who had been posted inside the building and had helped Mesmer’s daughter carry the wheelchair outside, died in the blast.

Just over a month later, on the first Wednesday morning of October, Mesmer decided to escape again.

“In the end, I thought it was better to die trying to escape than to die crushed under the weight of a collapsed building,” she said.

Mesmer, her daughter, and the 16-year-old captive wore jeans and t-shirts under their long black abayas. They walked the few blocks held by Islamic State and then past the frontline, hugging walls as they could. Mesmer, still in pain from her broken legs, limped along. When they heard incoming gunfire, the women hid in a building next to an abandoned mosque.

At 10 a.m., they heard the shouts of fighters from one of the Misratan brigades urging them to emerge from their hideout.

In a grainy video shot by the brigade’s fighters, one man can be heard screaming, “You are safe! I swear to Allah you are safe!”

In the video, the 16-year-old captive walks out first, hands in the air, followed a few minutes later, by Mesmer and her daughter. As the women approached, the fighters told them to stop and strip down to prove they were not wearing suicide belts. The instructions were lost on the women who continued to walk toward the fighters.

For a frightening moment, Mesmer was not sure whether they were safe or about to be shot - until she saw one of the soldiers do something forbidden by Islamic State. He dragged on a cigarette.

A week later, eight more women jumped through a kitchen window and walked to their freedom. They had been locked up after Mesmer and the two girls escaped but decided to bolt whenIslamic State fighters told them they were about to be moved again.

They followed the same path Mesmer had taken. A different brigade took them in.

“At first they were frightened, but after they realized they were safe, they took off their hijabs and said ‘We are free again,’” said Mustafa Shaibani, the 30-year-old commander of the Misratan brigade that received the captives.

The women asked for food and water. Shaibani’s brigade brought them brioche, water and minced-meat sandwiches.

By the end of October, 14 more women, including two Ethiopians and three Nigerians hadescaped. Seven Filipino medical workers followed.

There are now nearly 70 women in the military airbase where the Misrata brigades keep their female prisoners. The Eritrean refugees say they share rooms with Islamic State wives and female fighters who had helped sell them into sexual slavery while they were captives of the extremist group. Fights have erupted.

“These women used to sell us and exchange us and now that they’re here ... they call us dirty, they call us whores,” said Mesmer.

The brigades have not yet identified how many of the women were captives of Islamic State and how many came to Sirte on their own. What devastates the women is that their new captors see little distinction between them and Islamic State sympathizers.

“They call us Daesh. We are not Daesh,” the 42-year-old captive said. “We were captives. We suffered in the hands of Daesh. We want our freedom, but we haven’t found our freedom.”

As Mesmer and her 14-year-old daughter began their captivity with the Misratans, Reuters determined what became of her younger children.

The three children, aged 13, 10 and 8, had survived the crossing of the Mediterranean. They were in a small town in Germany, Giessen, a 50-minute drive north of Frankfurt. Her husband was living in the United Kingdom. The children had been unable to reunite with their father because he is an undocumented immigrant.

But they were safe, living with a caretaker assigned by the German government. In Misrata last month, a reporter told Mesmer the news and showed her recent pictures of the three.

For a moment, Mesmer was silent. Then she buried her head in her lap and burst into tears.

“My children,” she murmured between sobs. “I didn’t know if they were still alive. I didn’t know if they’d drowned at sea... I thank my God.”

(Additional reporting by Ahmed Elumami in Misrata; Edited by Simon Robinson and Alessandra Galloni)