Kesha has been facing an intense legal battle with Lukasz Gottwald, better known to the public as Dr. Luke, and recently received a detrimental court ruling.

Gottwald is Kesha’s music producer who she sued for sexual assault in 2014, according to The Hollywood Reporter. The pop singer has said Gottwald abused and manipulated her for years since first signing with him in 2005 when she was 18 years old. Court proceedings began six years ago when after Kesha, now 32, sued for sexual assault, Gottwald countersued for defamation and breaching contract, claiming she lied about the rape allegation to get out of her contract.

Thursday’s court ruling saw Kesha suffer a major setback. New York Supreme Court Judge Jennifer G. Schechter ordered Kesha to pay Gottwald $374,000 in royalties. The judge also ruled that Kesha had defamed Gottwald in an earlier claim stating that the producer had raped Katy Perry too. Although Perry denied the claim, other artists like Taylor Swift and Lady Gaga have publicly shared their support for Kesha amid her legal battle.

The other setback came when Judge Schechter ruled that Gottwald is not a “public figure” like Kesha claimed, meaning his team will not have to prove that Kesha acted with “actual malice” when she made her original assault claim, according to NBC News.

Kesha attends the Time 100 Gala at Jazz at Lincoln Center in New York City on April 24, 2018. Getty Images/Angela Weiss

Amid her legal battles, Kesha's music career has struggled. In 2012, she released the album “Warrior.” It wasn't until 2017 that she was able to negotiate the release of “Rainbow.”

“Dr. Luke promised me he would stall my career if I ever stood up for myself for any reason,” The New York Times reported Kesha saying in a 2015 affidavit. “He is doing just that.”

Now, she is working on finding her voice again. Her latest album, “High Road,” was released earlier this year.