Kesha Hollywood July 2014
Pop star Kesha (pictured in 2014) cannot break a contract with a record producer Dr Luke, who she accuses of raping her 10 years ago David McNew/Reuters

Pop star Kesha must continue to work with Dr Luke after losing a bid to be freed from her contract with the top record producer, who she claims sexually assaulted her. The 28-year-old singer broke down in tears as Manhattan Supreme Court Judge Shirley Werner Kornreich handed down the ruling refusing to let her walk away from a six-album deal with Sony.

The Tik Tok hitmaker had sought legal aid to nullify her recording contract because it brought her into contact with Dr Luke (real name Luke Gottwald). In the lawsuit filed in December, the songstress alleged that he forced her to "take drugs and alcohol in order to take advantage of her sexually while she was intoxicated" and threatened to harm her career during their decade-long professional relationship. Dr Luke was never charged with a criminal offence.

"She was terrified of speaking, messaging, tweeting or doing anything at all that he might disapprove of in the event that he would later use it to torture her and her family, as he had done so many times before," legal documents read.

Sony faces #FreeKesha campaign

Fans of the singer subsequently launched a petition – which has since amassed almost 140,000 signatures-asking Sony to release her from a contract. "It's our hope the court grants this injunction, but Sony can end all of this right now by voluntarily terminating Kesha's contract with Dr Luke," the campaign which is targeted at Sony boss Doug Morris, stated.

Sony has since offered to let her work with another producer, but Kesha said she feared the label will not promote her music as heavily if she's not working with Gottwald. He is one of Sony's biggest hitmakers and has the rights to produce at least six songs on each of her albums and could pursue damages if he does not.

Dr Luke and Max Martin
Dr Luke (left) and Max Martin (right) have worked extensively with Kesha during her career REUTERS/Mario Anzuoni

Scores of fans rallied outside the courthouse in support of the Kesha, who emerged from the courthouse visibly distraught after the hearing. The Timber star declined to speak to the press, but was seen embracing some of the campaigners before leaving.

"You don't deserve this at all. It's unfair," a fan, Lindsay Scarpa, told her.

Dr Luke, who has worked with the likes of Britney Spears and Katy Perry, has always maintained his innocence, describing the allegations as "defamatory" and claiming they have been contrived in an attempt to extort him into releasing the singer from her contract. "All of their horrific allegations of abuse, threats and other purported misconduct by me against Kesha are completely untrue and deeply hurtful," he said in a sworn statement in December.

Kesha's full legal complaint was uploaded to the website Scribd in October 2014. The court document details Kesha's accusations of sexual assault and coercive behaviour she made against Dr Luke.