A judge rules that the singer published a false statement when she texted Lady Gaga that her producer had also raped Katy Perry. Many other statements will be going to trial.

A judge's big ruling on Thursday could be worse for Kesha Rose Sebert, still battling producer Lukasz "Dr. Luke" Gottwald after five years in court. But not much, as the pop star has suffered some serious setbacks on the road to trial.

Back in 2014, Kesha sued Dr. Luke for sexual assault. He sued her for defamation and breaching contract. Before #MeToo became a thing, this legal dispute captured headlines and provoked a lot of conversation. Her claims didn't survive. His did, and now, thanks to the summary judgment round, he's gained plenty of advantages.

Dr. Luke, in his suit, claims Kesha has smeared him with false rape allegations. He alleges that her attorneys cooked up a "sham" lawsuit complaint in order to get her out of recording and publishing contracts. Kesha's former attorneys provided a draft of the complaint to Sony, and as the suit was filed, the media got it too. Kesha's public relations team detailed the plan in a written document — one that spoke of "inciting a deluge of negative media attention and public pressure on the basis of the horrific personal abuses presented in the lawsuit."

Judge Jennifer Schecter, who two years ago famously allowed former Apprentice contestant Summer Zervos to take on Donald Trump in a defamation suit ("No one is above the law," she wrote), now tackles the long-running case between Kesha and Dr. Luke.

The first big surprise in her decision (read here in full) comes in addressing the question of whether Dr. Luke is a public figure. If so, to prevail on defamation, he'd have to show actual malice on Kesha's part, meaning knowledge of falsity or reckless disregard for the truth. If not, he'd only have to demonstrate something akin to negligence.

"Gottwald certainly is not a 'general public figure,'" writes the judge. "Although he may be well known in music-industry circles, he has never been a household name or achieved general pervasive fame and notoriety in the community. Nor is he a limited-purpose public figure."

Moving on to other issues in the case, Schecter further rules that attorney Mark Geragos and the PR firm of Sunshine Sachs were Kesha's agents when they made statements on her behalf. The judge rejects many of Kesha's affirmative defenses, including that the defamatory statements are not pled with sufficient specificity, that Dr. Luke is libel-proof, that the statements constitute opinions and that the defamation claims are time-barred.

Nevertheless, almost all of the statements will be put to a jury to decide if they are defamatory.

That's because, among other issues, it's still a possibility that the statements were privileged.

"Ordinarily, statements made during or in connection with good-faith anticipated litigation are privileged and cannot give rise to defamation liability," writes Schecter. "Here, however, there are sharply disputed questions of fact going to the heart of the case about whether Kesha's California complaint was brought in good faith, as Kesha asserts, or whether it was a 'sham' intended to defame and pressure plaintiffs, as plaintiffs assert."

This is also a fancy way of saying that the truth of the alleged rape will be put to the test at the eventual trial.

"Kesha and Gottwald have very different accounts about what happened on the night at issue," the judge continues. "This court cannot decide, as a matter of law on papers and without any assessment of credibility, who should be believed and whether Kesha commenced the California Action, which she would not have done if she had been released from her contracts, in good faith or as a sham to defame Gottwald and obtain business leverage."

On one statement, though, Kesha can no longer dispute the falsity.

Schecter rules that Dr. Luke has met the burden of establishing that Kesha published a false statement about him when she texted Lady Gaga that he had also raped Katy Perry.

Here is where the judge's ruling that Dr. Luke needn't establish actual malice will loom large.

Dr. Luke "submitted evidence that [he] did not rape Katy Perry," the ruling states. "Perry unequivocally testified that Gottwald did not do so. In response, Kesha has not raised a triable issue. There is no evidence whatsoever that Gottwald raped Katy Perry or that Katy Perry, whose sworn testimony is unrefuted, must not be believed. Kesha cannot defeat summary judgment with mere speculation."

Here's the rest of the 32-page decision, which also covers Dr. Luke's successful breach of contract claim. Although Kesha has made a late payment of $1.3 million in royalties to Dr. Luke's company, she's deemed as owing interest. Furthermore, the judge has rejected Kesha's claim that her contract was unconscionable and that she was fraudulently induced into it based on Dr. Luke's promise to renegotiate. What's more, Schecter refutes Kesha's claim that the contracts were terminated when Dr. Luke's company sued her and elected damages as a remedy instead of specific future performance.