Sabrina Rubin Erdely, center, enters the federal courthouse in Charlottesville on Oct. 17. (Ryan M. Kelly/Associated Press)

Journalist Sabrina Rubin Erdely fired off an email to Rolling Stone editors in the middle of the night with a sobering subject line: “Our worst nightmare.” She wrote that she no longer trusted “Jackie,” the central figure in her article about a gang rape at the University of Virginia and that she believed the magazine should issue a retraction.

As an attorney representing a university administrator who is suing Rolling Stone over the piece read the email aloud in court Thursday, Erdely broke down.

“Are those your words?” attorney Libby Locke asked.

“Yes,” Erdely said softly, tears streaming down her face.

Jackie had told Erdely of surviving a brutal gang rape at a U-Va. fraternity when she was a freshman, an account that appeared to exemplify the problem with sexual assault on campus and the way the school responds to it. Jackie’s harrowing tale, and allegations that U-Va. administrators did little in response, was the backbone of Erdely’s cover story.

ABC News interviewed Nicole Eramo, the former University of Virginia administrator who is suing Rolling Stone magazine over a November 2014 story about a sexual assault. That story was discredited. (ABC News and 20/20)

But during months of reporting, Erdely was confronted with conflicting information about how the tale was relayed to Jackie’s friends. She found that the number of assailants wavered. And she noticed that Jackie had changed aspects of the account. But Erdely never questioned her credibility, and she testified in federal court that she never confronted Jackie about the discrepancies.

Erdely said she attributed the shifting details of the young woman’s tale to the trauma she experienced. Erdely had written extensively about victims of sexual assault and said they often change the details of their stories.

“It takes trauma victims some time to come forward with all the details,” Erdely said, explaining why she remained unskeptical after she learned that Jackie had told two versions of the story to her first-year roommate. “It’s not unusual.”

Later, she said she regrets trusting Jackie: “It was a mistake to rely on someone whose intent it was to deceive me.”

Locke, who is representing U-Va. administrator Nicole Eramo in a $7.5 million defamation lawsuit against Erdely and Rolling Stone, highlighted Erdely’s failure to explain inconsistencies in Jackie’s tale and her decision to run the story despite having never contacted key figures in it, including one of the young men Jackie identified as an assailant. Instead, Locke said, Erdely relied solely on the student’s word even as she grew increasingly distressed while the reporter pressed for ways to corroborate her account.

In a statement, Rolling Stone countered that Erdely was not the only one who trusted Jackie.

“It is clear that she firmly believed in the credibility of Jackie, as did U-Va. and Dean Eramo, when the article was published,” the statement said. “We made journalistic mistakes with respect to Jackie’s story and we have learned from them, but these mistakes do not support Dean Eramo’s lawsuit.”

The story, which painted U-Va. as indifferent to victims of sexual assault, prompted protests, vandalism and calls for Eramo to resign. Eramo, then a top administrator working on sexual assault prevention, said the article undid her life’s work. She testified earlier this week that the article portrayed her as attempting to suppress Jackie’s allegations when in fact she pushed Jackie to report her story to police.

Within weeks of the article’s publication, key details began to unravel, leading the magazine to issue a retraction.

Eramo’s attorneys have argued that Erdely arrived at the Virginia campus with a preconceived narrative and sought to cast characters, with Jackie filling the role of traumatized victim and Eramo personifying an institutional indifference to sexual assault.

Locke pointed out that the Rolling Stone article omitted key details that might have painted Eramo, who was not interviewed for the story, in a more favorable light, including quotes from subjects who viewed her positively.

Locke also underscored Erdely’s failure to contact key characters in the story, including the trio of friends who Jackie said met her following her assault and one of Jackie’s assailants, who Jackie claimed had brought her to the fraternity that night. In “A Rape on Campus,” the friends, identified by pseudonyms, react to Jackie’s tale with disregard. Jackie said one friend, Kathryn Hendley, asked her: “Why didn’t you just have fun with it?”

Erdely never reached out to Hendley before the article’s publication because, she testified, Jackie refused to give her Hendley’s last name. But, as her notes showed, another friend of Jackie’s provided her with an approximation of Hendley’s last name — “Handley” — that could have led her to Hendley’s identity and contact information. Contacted by The Washington Post shortly after the Rolling Stone story published, Hendley and the other friends disputed Jackie’s account.

“You attributed that quote to Ms. Hendley in the article, isn’t that correct?” Locke asked Erdely.

“Yes,” Erdely said. “To my great regret.”