Kesha's latest attempt to get out of her contract with Sony Music has failed.

A judge in New York has refused to overturn a ruling from February and dismissed claims the singer is now a "slave" to the record label.

Kesha has accused her former producer, Dr Luke, of sexually and emotionally abusing her, something he has denied.

The singer's lawyers claimed she was the victim of a hate crime, but the judge disagreed.

The case has been rolling on for months with other performers, including Adele and Taylor Swift, publicly supporting Kesha's attempts to leave Sony.

The latest ruling in New York has also led to new questions about how the legal row began.

It's been widely reported Kesha first filed a case against Dr Luke, whose real name is Lukasz Gottwald, in 2014 after which he countersued.

However the latest ruling suggests it was, in fact, the other way around with Kesha's abuse case coming after Gottwald tried to sue her for breach of contract.

Kesha has said she can't work with a "monster" and is accusing the producer of raping her a decade ago after giving her a pill that knocked her out.

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.

The latest ruling found holes in several legal arguments being made by Kesha's lawyers.

Manhattan State Supreme Court Justice Shirley Werner Kornreich said rape isn't necessarily an act of gender hatred, so can't be considered a hate crime.

In her ruling the judge wrote that although Gottwald's alleged actions were directed at Kesha, the Die Young singer has not suggested the producer has specific hostility towards women in general.

Kesha's lawyers had also argued it was "slavery" to force her to work for companies, which although owned by Sony, are controlled by Dr Luke.

But the judge decided Kesha's human rights were not being violated because Sony has promised to keep Kesha "insulated" from Dr Luke.

Previously Sony has said it is "not in a position to terminate the contractual relationship between Luke and Kesha" and that the singer can record "without any connection, involvement or interaction with Luke whatsoever".

In her ruling, Justice Kornreich wrote: "[Kesha's] claims of insults about her value as an artist, her looks and her weight are insufficient to constitute extreme, outrageous conduct intolerable in a civilized society."

Kesha's lawyers have not responded to the ruling.

Justice Kornreich also said the New York court had no jurisdiction over the case because the alleged abuse happened in California.

There was also a problem because the claims date back beyond the legal time limit, known as a statute of limitations.

The singer's lawyers say she was too afraid of him to speak up at the time.

Lukas Gottwald has produced some of the biggest pop hits of the past decade, working with stars including Katy Perry, Miley Cyrus, Kelly Clarkson and Nicki Minaj.

He says Kesha has made up the allegations to ruin his reputation in hopes of getting out of her five-album contract.

"Kesha and I were friends for many years and she was like my little sister," he wrote on Twitter in February.

The case in New York is just one in a number of court proceedings.

Kesha is still appealing against an earlier refusal to free her from her contract.

There is also Dr Luke's breach-of-contract claims against her as well as other cases being filed in California and Tennessee.

Find us on Instagram at BBCNewsbeat and follow us on Snapchat, search for bbc_newsbeat