A New York judge has thrown out pop star Kesha's legal bid to scrap her recording contract with Sony Music and producer Dr Luke.
The 29-year-old singer - real name Rose Sebert - had accused Dr Luke of rape and other forms of abuse.
She said he bullied her to lose weight until she was so traumatised that she developed an eating disorder and spent two months in a rehabilitation clinic in 2014. Kesha's lawyers had also argued that her contract amounted to "slavery".
Dr. Luke denied all allegations and filed a countersuit against the singer and her mother.
However the latest judgement leaves her with little legal room for manoeuvre.
Last month she appealed a decision, by New York Supreme Court Justice Shirley Werner Kornreich, to refuse to release her from a six-album contract with Sony, after she she filed a sexual assault lawsuit against Dr Luke in 2014.
Kornreich found in February that Kesha was free to record for Sony with other producers, without interference from Dr Luke, a decision the performer compared to slavery.
Without deciding on the truth of Kesha's allegations - including that she had been drugged, raped and emotionally abused by Dr Luke - the judge ruled that most of the singer's claims did not constitute valid causes of action to nullify a contract under New York law.
The judge also ruled that the wrongdoing alleged by Kesha took place outside the court's jurisdiction because the alleged abuse happened in California. She also said there were also difficulties with the singer's complaint of sexual assault as it fell outside the statute of limitations.
Kesha's lawyers had also argued that her contract amounted to "slavery" to
Earlier this week Kesha posted on Instagram that she had been offered a release from her contract, but only “IF i were to lie”.
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. I would rather let the truth ruin my career than lie for a monster ever again,” the singer posted.
The singer had recieved support from a string of high musicians following her legal battle against her producer Dr. Luke, including Taylor Swift who donated $250,000 towards the cost of her legal battle.
Lady Gaga tweeted that she is "in awe" of Kesha's bravery, while Demi Lovato called her a "brave and beautiful girl" and that her prayers are with her. Kelly Clarkson, Miley Cyrus and Ariana Grande also had lent their support.