SEATTLE (AP) — Lawyers for a transgender woman charged in a massive data breach at Capital One asked a judge Tuesday to release her from federal custody, saying that for her to remain jailed with men is a serious threat to her mental health.

Paige Thompson, a talented computer programmer from Seattle who goes by the online handle “erratic,” was arrested last month after the FBI said she obtained personal information from more than 100 million Capital One credit applications. There is no indication she sold or distributed the data.

A hearing is scheduled for Friday before Magistrate Judge Michelle Peterson on whether Thompson will remain at the Federal Detention Center in SeaTac pending trial. Prosecutors say she should because she presents a flight risk and is a danger to herself and others. They said she has “a long history of threatening behavior that includes repeated threats to kill others, to kill herself, and to commit suicide by cop,” and that in May police investigated after she made threats to shoot up a California social media company.

In a response filed in U.S. District Court on Tuesday, her attorneys, federal public defenders Mohammad Hamoudi and Christopher Sanders, asked for her to be released to a halfway house where she would have better access to mental health care.

They cited the other suicides and suicide attempts in federal pretrial detention — including the recent death of Jeffrey Epstein — as evidence that such facilities are ill-equipped to support defendants suffering from serious mental health issues. And, they said, a psychiatric evaluation of Thompson performed by Dr. Matt Goldenberg noted that feminizing hormones had created permanent changes in Thompson, including breast growth, that could put her at higher risk of abuse.

“The risk of being continuously misgendered and becoming a target for intimidation by other inmates is likely increased in a male facility,” Goldenberg wrote. “Longterm placement in a men’s facility will likely increase Paige’s gender dysphoria, depression, and risk of suicide.”

Thompson’s lawyers also filed a letter of support from the American Civil Liberties Union urging her release.

“The conditions that many transgender women face in prison result in lifelong trauma, adverse health consequences, and at times, death,” ACLU attorney Chase Strangio wrote to the court. “Too many end up being abused or engaging in self-harm in the midst of trauma and emotional crisis.”

The defense lawyers noted that Thompson had never before been arrested nor assaulted anyone, and they submitted a statement from one of her housemates, Diane Eakes, saying that while Thompson tries to get attention by saying outlandish things, she would never hurt anyone.

Further, they said, Supreme Court precedent dictates that unless the government demonstrates a serious risk of flight, pretrial detention is only available for the most serious crimes, including crimes of violence, serious drug crimes, and offenses that can bring a life sentence.

Hamoudi and Sanders said there is no evidence Thompson might flee, and that in fact she has always cooperated when contacted by law enforcement before. Following the threat to the social media company, a Seattle police officer wrote in a report, “I am familiar with Paige Thompson and my unit has a response plan for her,” and found she had no means or money to travel to California.

Their filing also filled in some of Thompson’s biographical background, noting she grew up in Arkansas and dropped out after her first year of high school as she struggled with her gender identity. She moved to Seattle, leaving behind a chaotic home life, to pursue a career in technology. They said her life has been one of “survival and resilience.”

Assistant U.S. attorneys Andrew Friedman and Steven Masada anticipated that Thompson’s lawyers would seek her release on mental health grounds in a memorandum filed earlier this month.

“Thompson’s mental-health conditions are long-standing and well-known to Thompson,” they wrote. “And Thompson made the threats and committed the crimes that counsel against her release, even while apparently receiving mental-health treatment. There is no reason to believe that any mental-health treatment that Thompson might receive while on release would be any more effective in reducing the danger that Thompson would pose than her prior treatment.”