Before December 2014, Sabrina Rubin Erdely had a career as an award-winning magazine journalist known for her revealing in-depth investigations, including work later anthologized in books such as "Best American Crime Writing."

Then came her professional downfall: A University of Virginia junior whose shocking allegations of a gang rape at a fraternity house during her freshman year.

Though the tale was horrific, it proved not to be true.

Erdely's account of the attack became the central narrative in a 2014 Rolling Stone magazine article, a story five months in the making that took up 10 pages in the magazine's December issue.

Shortly after the article published online, Erdely appeared on television and radio shows to promote her investigation, receiving plaudits for what appeared to be a blockbuster chronicling the gang rape allegation from "Jackie" -- and how the university handled it -- as an example of the culture at U-Va. surrounding sexual assault.

"Ultimately, I chose to use Jackie's story as a prism to address the broader issue of how colleges struggle to respond to allegations of sexual assaults on campus," Erdely wrote in new court documents, filed late Friday as part of a defamation lawsuit against Rolling Stone.

"The extremely troubling nature of the allegations that Jackie reported to UVA - a sexual assault by multiple men during a party at a popular fraternity - crystallized for me the central question of the Article: What is the responsibility of university officials when they receive a report of this nature, even if the victim herself does not want to take action?"

Then, according to the new court filings, she came to lose confidence in the primary source in her article after other news organizations began to unravel the details. She wrote a late-night email to her editors alerting them that she no longer trusted the allegations, hours before the fraternity in question would publicly attack the story and The Washington Post would outline holes in the gang-rape narrative.

"The subject line of my email was 'our worst nightmare,' and that was true," Erdely wrote in the court filing. "The experience of losing faith in Jackie's credibility was devastating and disorienting. I had been completely blindsided. I felt shattered."

The Charlottesville Police Department conducted an investigation and determined that Jackie's claims, as published by Rolling Stone, were false.

The article was retracted in April 2015 after a report by the Columbia University journalism school concluded that Erdely's story, titled "A Rape on Campus," was deeply flawed.

She was later named in a $10 million lawsuit filed by U-Va. Associate Dean Nicole Eramo, who claims that Erdely's article portrayed her as callous and indifferent to Jackie's allegations even in the face of evidence that Jackie's story might be fabricated and that Eramo had taken steps to help the U-Va. student.

The court documents filed as part of the Eramo case represent the most comprehensive account of Erdely's version of the events surrounding the publication of the article and reveal new insights, including an 85-page declaration Erdely wrote in the first-person detailing her reporting for the story.

"I would never have written or published an Article in which I did not have complete confidence," Erdely wrote. "This experience has been devastating to me, both professionally and personally. Never in my 20-plus years as a reporter have I had a story or a source fall apart on me after publication. After feeling so sure about the Article, and believing so strongly that it would help spur change on college campuses, losing faith in the credibility of one of my major sources postpublication took me entirely by surprise. I was stunned and shaken by the experience, and remain so to this day."

A lawyer for Jackie did not respond to a request for comment; Jackie full name has been redacted from the court documents. Spokesmen for Rolling Stone and U-Va. did not return requests for comment; Erdely also did not respond to a request for comment.

Erdely wrote in the court documents that she never meant to denigrate Eramo, noting that in her article she highlighted that survivors who came to her with their allegations, including Jackie, held the associate dean in high regard.

"It appears that the centerpiece of Plaintiff's claims in this case is to argue that I believed all along that Jackie was an unreliable source, yet forged ahead anyway. Nothing could be further from the truth," Erdely wrote. I had complete faith in Jackie as a source. Through our 20-plus hours of interviews over the course of several months, I found her to be forthright and credible. Jackie was voluble and confident, and she gave detailed descriptions that were consistent over time. ... I also knew, from my own research and writing on this issue, that false allegations of sexual assault are very rare."

Other court documents, including more than 400 pages of Erdely's reporting notes, show that there were numerous red flags that Jackie's account might not hold water. Her fraternity gang-rape tale appeared to mimic details included in books and a television show Jackie had seen -- both of which were mentioned to Erdely in early interviews with the student -- and some details she provided to Erdely clashed with witness accounts, though Erdely did not interview those witnesses, according to the court documents. A recent graduate of U-Va., who was working to help sexual assault survivors as a university employee, also warned that Jackie's memory of the attack might be spotty and Erdely also received warnings that Jackie's account appeared to change over time.

The unraveling of the article sent Erdely's own life into a downward spiral. Ivy League educated, Erdely had been known for a renowned career as a magazine journalist for the New Yorker, GQ and Mother Jones.

"Over the course of my 20-plus years as a features writer and investigative journalist, I have covered a wide array of subjects, including a modern-day Bonnie and Clyde; the life lessons learned from a con man; the rise and fall of a teenage Internet celebrity; and the stranger-than-fiction lives of the heirs to the Duke family fortune," Erdely wrote. "For the sake of my articles, I have trekked through Tibet, watched an autopsy, joined a religious cult, visited maximum security prisons, and once tried out to be a Philadelphia Eagles cheerleader."

Her prior work for Rolling Stone probed sexual assaults in the military and sex crimes in the Catholic church. She wrote in her declaration that she's interviewed dozens of sexual assault victims and has spent hundreds of hours researching the topic. She decided in spring 2014 to begin work on a new article about college "rape culture" and later settled on focusing her investigation at the U-Va. because of the school's prestigious reputation and early reporting that appeared to show that the school's handling of sex assault allegations was lacking.

She had interviewed John Foubert, a former assistant dean of students at U-Va. who also founded an all-male sex assault prevention group known as One in Four. He told Erdely that U-Va. was "more egregious than most," when it came to addressing sex assault allegations "both in their lack of prevention and in their lack of response."

Erdely wrote in the court documents that when reporting on Jackie's case she had no reason to doubt the student's allegations. Jackie provided her with documentation to back up her claims, including e-mails and text messages about her assault with Eramo and others. She learned directly from the president of the university, Teresa Sullivan, that U-Va. had placed the fraternity, Phi Kappa Psi, under investigation; it appears that investigation happened solely because of Jackie's claims, which were never validated, and the fraternity was later cleared.

But when Erdely asked to interview Eramo and the head of the women's center on campus, the administration rebuffed her request.

"I was surprised and disappointed by UVA's about-face, now denying me access," Erdely wrote, noting that Eramo had readily agreed to be interviewed and a university spokesman had acknowledged that she was the best source for information on sexual misconduct. "By shutting down the interviews, it appeared UVA was stonewalling me."

Erdely relied on Jackie to help her locate friends from her freshman year who the student said could substantiate her claims. But when Erdely pressed Jackie to find one friend in particular -- who met Jackie minutes after the purported attack -- Jackie told her that he did not want to participate in the article. Erdely took her word for it.

"It never remotely occurred to me that Jackie was making this up," Erdely wrote. "Jackie had previously referred me to several friends or witnesses, so I had no reason to question this (unsuccessful) referral."

During a reporting trip to Charlottesville, Erdely accompanied Jackie on an outing to Rugby Road, a promenade near the campus featuring rows of fraternity and sorority houses. When the columned portico of the Phi Kappa Psi house came into view, Erdely wrote that Jackie descended into tears.

"Jackie froze and became visibly overcome with emotion: she looked terrified and began to cry, then collapsed in inconsolable sobs," Erdely wrote. "For me to have witnessed her spontaneous, uninhibited reaction dramatically reinforced the fact that Jackie appeared as a traumatized sexual assault victim."

Erdely also interviewed Rachel Soltis, who shared a dormitory suite with Jackie during her freshman year. In the interview, Soltis told Erdely that Jackie had originally described her assault in a different way: that she had been forced to perform oral sex on a group of men. The now-retracted story that appeared in Rolling Stone recounted an attack during which Jackie was held captive in a fraternity room for more than three hours while she was raped repeatedly by seven men while lying on shards of glass from a broken table.

"The fact that her description of the assault itself had evolved from a 'bad run in' to forced oral sex to vaginal penetration did not concern me, nor did it cause me to doubt Jackie's credibility," Erdely wrote. "To the contrary, I found this to be entirely consistent with the behavior of a victim of sexual assault or other trauma. In my experience writing about trauma victims and sexual assault victims, I know that their stories can sometimes evolve over time as they come to terms with what happened to them and work through their own shame and self blame, and that this process can result in the victim revealing new or different details over time."

Erdely also attempted to persuade Jackie to tell her the name of the ringleader of her alleged attack, who Jackie described as a handsome junior and lifeguard who had invited her on a date and then to a fraternity party. Jackie refused to provide a name, and Erdely was unable to confront any alleged perpetrator. In the end, Erdely wrote, the magazine's top editor, Will Dana, allowed the article to move forward. Dana resigned in July 2015.

"This did not in any way diminish my sense of Jackie's credibility," Erdely wrote. "To the contrary, her fear about me contacting (the ringleader) - and specifically, her fear of retaliation if I were to get the name from her - was consistent with the behavior of other sexual assault victims I had interviewed in the past."

Erdely wrote in her statement that the publication of the article has filled her with regret.

"As I have said publicly, I am deeply sorry about any negative impact this Article has had on others," Erdely wrote. "It was never my intention to cause harm, and I feel nothing but sorrow and regret over the entire experience. If I had had any doubts prior to publication about the integrity of this story, or about Jackie's credibility as a source, I would not have published it; instead, I would have gone back to my extensive reporting file to write a different story, one in which Jackie's story was at most a footnote."