Dressed in fitted slacks, a satin bomber jacket with a fake fur collar, and a black scarf that loosely framed her face, Nadia, 22, spoke in a dull monotone of her journey from life under the Islamic State (also known as ISIS) to life in a Kurdish prison. She said she had not seen her three-year-old daughter since she fled her abusive husband, a fugitive ISIS member, in March.

A Sunni Arab from the Salahuddin Governorate in central Iraq, Nadia—whose name has been changed to protect her identity—was married off to a local farmer in 2012. Although their marriage was arranged, they got along at first, she told me from the visiting room of an Erbil prison. But everything changed for the worse when ISIS took over their village for two months in 2014.

What happened next underscores the serious challenges the Kurdistan Regional Government (KRG) faces as it seeks to identify security threats among the hundreds of thousands of Iraqis streaming across its borders from ISIS-held territory and to prosecute those who were part of the extremist group. During this difficult process, there is a risk that the KRG may be arbitrarily branding many women and even children who lived under ISIS as guilty by association—including those who had not welcomed the extremist group or were abused during its harsh rule.

Many residents fled Nadia’s village when ISIS took over. But Nadia said that her husband insisted they remain to care for their cattle. After Iraqi forces routed ISIS a few months later, village elders returned and banished them and others who had not run away, accusing them of being ISIS sympathizers.

The couple moved with their infant daughter to Mosul, and there her husband, unable to find other work, did join ISIS as a checkpoint guard. Although he initially joined to support his family, said Nadia, he became increasingly “brainwashed” and quickly turned “aggressive,” beating her routinely. “He didn’t beat me until he joined ISIS,” said Nadia. “They changed him, they spoiled his mindset.” When she said she would leave him, he threatened to either kill her or take away their daughter.

But when ISIS began pressuring Nadia’s husband to become a frontline fighter, he refused—and was beaten and jailed by the group for two months. The day after his release in November 2015, he fled to neighboring Turkey. After ISIS discovered his escape, one of its enforcers tried to make Nadia reveal his whereabouts. When she refused, she said, the enforcer hit her on the head with his rifle and threatened to kill her. Her in-laws feared for her life and persuaded her to let them smuggle her and her daughter into Turkey to join her husband.

She and her daughter reached Turkey after a weeks-long journey involving two sets of smugglers, crossing first into Syria on the back of a truck in a cage hidden beneath bags of sand and soil. “The guards would poke the soil with a stick to see if there was anything beneath it,” Nadia said. Terrified her daughter would cry, she said she reluctantly doped her with cold medicine. But she survived that trip only to be battered anew by her husband. “He beat me again and again and again,” Nadia told me. When he discovered she was plotting to return to Iraq with their daughter, “he threw me out of the apartment and closed the door in my face,” refusing to let her take their daughter with her.

Alone and terrified, she said she crossed the southern Turkish border into what she thought was a sanctuary: Iraqi Kurdistan, whose troops are a key force in the international coalition fighting ISIS. But during a search of the bus she was traveling in, Asayish, the security arm of the KRG, arrested her after finding what they considered to be incriminating photos on her phone. One showed her wearing a black cap with the ISIS logo.

“It was a joke, a terrible joke,” Nadia said of the photo, insisting she was not an ISIS member or sympathizer. The photo showed her fully made up with her hair down. “It was an insult to ISIS, as women should cover their faces and not wear makeup,” she told me. “If [members of ISIS] had seen this photo, they would have slaughtered me.” Another photo showed Nadia’s husband sporting a flowing beard and posing with an assault rifle. Nadia said she immediately told the Asayish agents that the photo was of her husband, that he had been an ISIS member, and that she was fleeing him. “Why would I keep that photo of my husband if I wanted to protect him?” she said she asked the agents. They did not believe her.

Now in her 12th month of detention at the Women and Children’s Reformatory in Erbil, Nadia is charged with participation in a terrorist group, which carries a sentence of up to 15 years. For the first 17 days of imprisonment, she said, security agents held her in isolation in a dank cell in an unsuccessful attempt to make her confess allegiance to ISIS. Solitary confinement for more than 15 days can constitute inhumane treatment and in some cases torture under United Nations standards. Her cell had no heat. The toilet was broken, and the two tiny windows were located near the ceiling. “They wanted to pressure me [into confessing],” Nadia said. “I wanted to kill myself. I was crying and begging, ‘Please, get me out of here.’” For four months, Nadia said, she could not make phone calls or take family visits. When we spoke in December, the KRG had still not provided her with a lawyer, and she said she had seen a judge only once.

AT THE REFORMATORY

Nadia was one of ten women detained on terrorism-related offenses whom I interviewed at the Women and Children’s Reformatory. Two of the women had been convicted for trying to commit suicide bombings—one of them in 2008—and readily admitted this was the case. But the other eight women claimed that their only crime was being related by marriage or blood to a member of ISIS or its precursor, al Qaeda in Iraq.

Many of the eight women said they had not been provided with a lawyer, as required under Iraqi law. They had spent anywhere from one to nine months in prison without charge or trial. International law requires that detainees be charged “promptly,” a period that should not exceed a few days or, at most, a few weeks. Six of the women’s children, ranging in age from ten months to eight years, were living inside the prison with them.

Dindar Zebari, the KRG liaison for nongovernmental organizations, denied any abuse of detainees and said that the KRG does its utmost to uphold the rights of the accused. Legal proceedings for terrorism-related cases tend to be more complex and take longer than those for common crimes, he said. Zebari insisted that the photos on Nadia’s phone were, in fact, “an indication of [her] support for ISIS.” He said a court would provide her and all others accused with lawyers if they could not hire one.

In a positive step for justice, on February 22, an Erbil court dismissed a case against Bassema Darwish, a Yazidi mother of three who had been enslaved and raped by an ISIS emir. The KRG had accused Darwish of complicity in the killings of three KRG peshmerga by ISIS fighters in October 2014. Darwish told the court an Asayish interrogator had beaten her and threatened her with rape if she did not confess to a role in the killings. Still, justice had been slow in coming: Darwish waited 28 months in prison to go to trial. And her case is not yet over: she remains in custody during a 30-day window for the KRG to decide whether to file an appeal and will most likely remain locked up pending the outcome of her case should it do so.

The women and children I met at the Erbil reformatory had frequent access to a large courtyard. But much of the time the mothers and children were crowded into a poorly ventilated cell with the other female prisoners. Prison staff said the cell, housing 24 people, was built for half that number.

One of the prisoners, Yasmine, had been a 16-year-old widow when KRG forces caught her trying to enter Erbil wearing a suicide vest in 2008. Yasmine, who also did not want to disclose her real name, told me that al Qaeda in Iraq had recruited her by barraging her with messages and calls saying that U.S. forces had killed her husband and that she needed to avenge his death. Twenty months have passed since Yasmine completed her seven-year prison term, but she remains in jail. The KRG authorities, she and a family member said, had accused her of developing links to ISIS during her years in detention and would not let her leave prison, even though a judge had ordered her released for lack of evidence.

Among the women awaiting charge or trial, one said she was detained because her son had joined al Qaeda in Iraq a decade earlier, although she had cut off all contact with him since then because he had joined the extremist group. Another woman said that she was related to a prominent ISIS member but had never even spoken with the relative and had seen him only once in her life, at a family gathering in 2002. A third woman said that she and her husband, a former Iraqi police officer, were detained as ISIS suspects because their home was the only one in their village that ISIS had not destroyed; she said that was because ISIS had taken over the house and kicked them out.

Two women said that ISIS had killed one or more of their family members. Three women, including Nadia, said they had left their husbands because the men joined ISIS and that their spouses had threatened and beaten them or taken their children away in retaliation.

Nadia is scheduled to go to trial on April 18. But she is charged under the KRG counterterrorism law of 2006, which lapsed last July, potentially leaving her in a legal limbo, along with many of the 1,500 other Iraqis the KRG says it is holding as ISIS suspects.

As the KRG authorities try to get to the bottom of cases like Nadia’s, it’s critical that they base their findings on credible evidence and resist assuming guilt by association. The challenge of keeping the region safe from groups such as ISIS is immense, but it does not absolve authorities of the responsibility to afford suspects the due process rights to which they are entitled under domestic and international law.

As a start, the KRG should prioritize impartial investigations into the merits of the accusations against these women and ensure they are afforded full, fair-trial guarantees, including adequate counsel. They should enforce a zero-tolerance policy toward forced confessions or other detainee abuse. Other members of the international coalition fighting ISIS should press the KRG to do so as well; otherwise they risk dirtying their own hands. Settling for anything less risks revictimizing women who have already suffered under ISIS and fuels the ISIS narrative that the KRG and its allies are foes, not friends, of Iraqi Arabs.