​A Manhattan judge has rejected singer Kesha’s claim she was a “slave” to Sony and its top producer Dr. Luke.

Rejecting the “Tik Tok” singer’s attempt to get out of her recording contract and ruling her rape and “hate crime” claims​ against her former mentor​ Dr. Luke are too old and off the mark, Judge Shirley Kornriech tossed most of Kesha’s suit against Sony and the producer.

“Slavery has been outlawed since the 19th century,” Kornriech wrote in a decision released Wednesday.

The allegations that Gottwald attacked Kesha on a plane in 2005 and in his hotel room in 2008 are also time-barred because the law says a victim must bring a claim within no more than five years of an incident, the judge found.

And the judge smacked down Kesha’s arguments that Gottwald was guilty of a “hate crime.” ​​

“Although [Gottwald’s] alleged actions were directed to Kesha, who is female, [Kesha’s claims] do no allege that [Gottwald] harbored animus toward women or was motivated by gender animus when he allegedly behaved violently toward Kesha,” the ruling reads.

The singer also alleged that Gottwald emotionally abused her by calling her a “fat f—ing refrigerator” and saying, “You are nothing without me.”

But the judge said the comments didn’t rise to the level of “extreme, outrageous conduct” required to prove intentional infliction of emotional distress.

Kornriech did allow Kesha to could continue her case against Gottwald and Sony over whether her contract is still valid based on the fact that the producer sued her for money damages instead of performance after she tried to break her recording agreement.

“I got offered my freedom IF i were to lie,” she wrote to her fans. “I would have to APOLOGIZE publicly and say that I never got raped. THIS IS WHAT HAPPENS behind closed doors. I will not take back the TRUTH,” she posted along with a makeup-free selfie. “I would rather let the truth ruin my career than lie for a monster ever again.”