However, the producer swiftly countersued. His lawyer, Christine Lepera, said that the singer’s allegations were part of “a campaign of publishing outrageous and untrue statements”.

The singer hopes that the lawsuit will extricate her from her contract with Luke, whose real name is Lukasz Sebastian Gottwald.

Kesha’s lawsuit alleges that Gottwald plied the singer with drugs and alcohol before making sexual advances towards her.

Kesha claims that on one occasion she was given “sober pills” by the producer during a drinking session, and subsequently woke up naked in his bed with no memory of how she had got there.

Earlier this year, Kesha entered rehab for an eating disorder, which she said was caused by the producer’s treatment towards her. She claimed that the producer called her “a fat fucking refrigerator” and added “You are not that pretty, you are not that talented, you are just lucky to have me.”

Gottwald has produced and co-written Kesha’s biggest hits. He has also worked with singers including Pink, Katy Perry, Britney Spears and Kelly Clarkson. The pair have long been wrangling over the singer’s creative direction, with the singer complaining that she had little input into her last album, Warrior.

In a statement, Kesha’s lawyer, Mark Geragos, told TMZ: “This lawsuit is a wholehearted effort by Kesha to regain control of her music career and her personal freedom after suffering for 10 years as a victim of mental manipulation, emotional abuse and an instance of sexual assault at the hands of Dr Luke.

“The facts presented in our lawsuit paint a picture of a man who is controlling and willing to commit horrible acts of abuse in an attempt to intimidate an impressionable, talented, young female artist into submission for his personal gain. Kesha is focused on moving her life and her career beyond this terrible time.”