Kesha cries as judge refuses to let her out of a contract with Sony Records

Any hopes Kesha may have had ahead of a court hearing in Manhattan were dashed Friday when a judge denied her request for a preliminary injunction that would have temporarily lifted her contract with Sony Records and freed her from working for Dr. Luke, the record producer she has accused of rape.

Justice Shirley Kornreich took Sony's side in the dispute, deciding that the record company would be harmed if Kesha didn't deliver the six albums she's contracted for, the New York Daily News reported.

The "Tik Tok" singer, 28, was sitting in the back row of the courtroom with her mother and looked stunned upon hearing the judge's decision, the outlet said. She reportedly broke down in tears after a fan seated in front of her began sniffling loudly.

thank you for all the support in my legal case animals. i love all of you. it's meant the world to me. xoxo pic.twitter.com/arHNPSxFs8

Attorney Mark Geragos had sought the injunction so that Kesha could, according to Billboard, get back to work. In January 2014, Kesha sought treatment for an eating disorder. Months later, in October, she sued her producer, whose real name is Lukasz Sebastian Gottwald, alleging sexual assault and battery, sexual harassment, emotional distress and more.

According to the lawsuit, over the course of a decade, after bringing her to Los Angeles from Tennessee at 18, Gottwald "sexually, physically, verbally, and emotionally abused Ms. Sebert to the point where Ms. Sebert nearly lost her life," aiming "to destroy her self-confidence, self-image, and self-worth so that he could maintain complete control over her life and career." The complaint filed in Los Angeles Superior Court paints a dark picture of abuse, including comments about her talent and her weight.

At the same time, Dr. Luke sued Kesha in a New York court, alleging defamation and breach of contract. A couple of weeks later, Gottwald sued Kesha and her mother, Pebe Sebert, in Federal Court in Tennessee, which the singer calls home, alleging the same things.

Last June, a judge put Kesha's L.A. County lawsuit on hold, noting a clause in the contract that required any disputes to be handled in New York, and in February, a judge in New York dismissed Gottwald's defamation suit against his former artist and her mother.

Kesha got support on social media Friday from fellow performers Lady Gaga, Ariana Grande and Lorde.

There are people all over the world who love you @KeshaRose. And I can say truly I am in awe of your bravery.

During the hearing, according to the Daily News, the judge noted that Sony had offered Kesha the opportunity to work with a different producer, and discounted an argument by the singer's attorney that the record company wouldn't promote her music if she didn't make it with Dr. Luke because it had more invested in him than it did in her. Kornreich also raised questions about evidence to support the claims of sexual and physical violence the "Die Young" singer made in her lawsuit.

The judge did not rule on dueling motions to dismiss both parties' claims, saving that decision for a later date.