It was the eve of a major trial when Harris County prosecutor Nick Socias’s phone rang — a call from the woman who would be testifying in it, whose story would soon become the central controversy in this year's race for district attorney.

The call was from 25-year-old Jenny, who was raped two years earlier by a man named Keith Hendricks, the man she would have to face on the stand the following morning. She sounded panicky, telling Socias immediately, “I need your help.” She had just been kicked out of the house after getting into an argument with her mother, who, battling cancer, hated when Jenny smoked cigarettes. So she wound up on the streets in Cypress, walking aimlessly and erratically, before Socias drove out and booked her a hotel room for the night.

Offering his side of the story for the first time at a press conference Thursday, Socias said it was just one example of the lengths he went to to help Jenny, who suffered from schizophrenia and bipolar disorder, before he gave in to the last resort: booking her in jail for 27 days in order to secure her testimony and a conviction. Jenny had endured a mental breakdown on the stand on the first day of trial, then spent ten days in a mental hospital recovering. Socias maintained Thursday that he resorted to putting her in jail only after Jenny threatened to run away and never return to resume her testimony — meaning the rapist would have walked free. Her mother refused to take her in, Socias said, and other mental hospitals would not agree to commit her, apparently leaving jail as the last option.

Socias and the attorney representing him in the lawsuit Jenny filed, Rusty Hardin, said these efforts to help Jenny as much as possible have not been apparent in what Hardin described as “misleading” political ads aired by Harris County District Attorney Devon Anderson’s Democratic challenger, Kim Ogg. After months of criticism from various activist groups, from the press and most heatedly from Ogg, Anderson has fallen behind Ogg in the polls by seven points largely because this controversy has stolen the campaign spotlight.

In many ways, this jailed rape victim case is to the DA’s race as Hillary Clinton’s emails and the sexual harassment allegations against Donald Trump are to the presidential race: For many in Harris County, the case appears to have decided their votes. Despite the fact that, according to Socias, Anderson was never aware that a mentally ill rape victim had spent nearly a month in jail until Jenny and her mother sued the county, Anderson has staunchly defended Socias and, largely, has taken the heat for what happened — to the detriment of her re-election campaign. Ogg has run ad after ad attacking Anderson for being the one to put Jenny in jail, causing outrage among voters on both sides of the aisle.

Hardin, who has donated to Anderson’s campaign, said he and Socias had intended to stay quiet throughout all of the uproar. That is, until Ogg’s campaign recently released a TV ad in which Jenny’s mother speaks out against Anderson. In the ad, Jenny’s mother is heard saying, “She was hurting. She needed compassion. But she was handcuffed and put in the back of a police car. And District Attorney Devon Anderson had her sent to jail."

Saying the full story can’t be crammed into a “misleading” ad, Hardin said it was the reason he decided to allow his client to finally go on the record.

“Neither Nick nor I are critical of the mother for feeling like she could not handle this young woman and did not want the responsibility of taking her back,” Hardin said. “This young lady had a history of mental illness, of suicide attempts. Those of us who have had mental illness in our families know how hard it is to deal with. But it’s wrong for her to be lending herself to commercials, accusing the DA of putting her daughter in jail, when these emails will show Nick said to her, ‘I will release her to you if you are willing to take her in,’ and the mother declined.”

In the emails, released to reporters Thursday, it is apparent that Jenny’s mother is invested in her daughter’s emotional and mental well-being. She informed Socias in September 2015 that Jenny was too emotionally distressed to testify and urged the prosecutor to find a way to forfeit the defendant’s right to confront Jenny in the courtroom.

“I love my daughter and the system must be flawed to force her or any victim under these unique circumstances to testify in person if they’re not emotionally ready because they’re under doctors care,” she wrote in one message.

But it is also apparent that her mother agrees Jenny needs to stay in custody pending trial, if only with her best interests in mind. “I do not agree with letting her go either,” she wrote to Socias on December 29, several days after Jenny was booked in the Harris County Jail. “She is so lost from the daughter I once had. She needs help.”

For whatever reason, however, Jenny was not booked into the mental health unit of the jail, per Socias’s instructions to jail staff, but only into general population. And so Jenny was not necessarily getting the help she needed. It was a few days before Socias became aware: He was undergoing surgery for a cancer biopsy right before Christmas.

Once Socias found out after Christmas weekend, he emailed Jenny’s mother to inform her that somehow jail mental health staff didn’t think she met the “criteria” to be housed in the mental health unit. She responded, “That is not good news. Jenny can act normal, but not really be normal…Tell Jenny if she wants more freedom she will need to say she needs to be transferred to [the Harris County Psychiatric Center]. Otherwise tell her she will have to stay at the jail.”

According to the lawsuit, Jenny was beaten by jail guards and inmates throughout her 27-day stay. Her traumatic experience has led Ogg to characterize Anderson’s office as full of win-at-all-costs prosecutors, lacking empathy and the simple wherewithal to protect vulnerable witnesses from further abuse.

Anderson has said that she regrets how the situation unfolded, that Jenny should have never stayed that long in the jail and that she unfortunately “fell through the cracks.” Still, Anderson has repeatedly emphasized that, without Jenny’s testimony, the serial rapist would have gone free and raped or even killed another woman.

On Thursday, Socias echoed Anderson, laying out Keith Hendricks’s criminal history in gruesome detail in a three-page summary. Hendricks was suspected or convicted of raping or assaulting 17 women. According to prosecutors, he raped Jenny in an abandoned house in Midtown just 27 days after being released from a three-year stay in jail for raping another woman.

“He was a serial rapist on a level that is hard to even comprehend, but what I do, and what I have to balance, is everyone in Harris County," Socias said. "It’s not just Jenny; it’s the next Jenny. It’s the next Jenny after that. We’re not talking about if it will happen, but when. When will there be someone else that has to go through what Jenny went through?...I did everything I did to make sure that no one else would have to go to the hospital and get a rape kit, or even end up dead in the street from this man.”

Ogg has said she would have let Hendricks go instead of re-victimizing a victim. Politically, she has capitalized on a basic fact that does not change no matter how many details are divulged or nuances explored, no matter if the story is told at a press conference or in a 30-second political ad: that a mentally ill rape victim was put in jail.

Asked if he would have done anything differently, knowing what he knows now, Socias said no.

Correction, October 29, 9:35 a.m: It was Devon Anderson who said Ogg said would let Hendricks go, not Ogg herself. Wayne Dolcefino, Ogg's spokesman, said Ogg would have preferred to put Jenny in a hotel room guarded by a law enforcement officer.

