Kesha lost a preliminary injunction motion today that would have allowed her to record music without her longtime producer Dr. Luke (aka Lukasz Gottwald), The Hollywood Reporter reports. Kesha has been embroiled in a lawsuit with Dr. Luke and Sony Music (which owns Gottwald's label Kemosabe Records), for several years. The injunction would have permitted Kesha to prematurely terminate or edit her contract with Sony, and release music outside of Gottwald's shadow.

The contract was already "heavily negotiated."

In 2014, Kesha sued Dr. Luke for sexual assault and battery, claiming she was "sexually, physically, verbally, and emotionally abused" by the producer throughout their decade-long relationship, according to Rolling Stone. Dr. Luke denied the allegations and countersued, claiming Kesha's lawsuit qualified as extortion and a breach of contract. Sony Music effectively sided with Dr. Luke, saying it was just "caught in the crossfire" of their legal fight.

Then, in the fall of 2015, Kesha and her attorney Mark Geragos sought an injunction on the grounds that Kesha was unable to work while the court case dragged on. In an affidavit included with Kesha's injunction request, former Universal Music Group Distribution CEO Jim Urie wrote, "If Kesha cannot immediately resume recording and having her music promoted, marketed, and distributed by a major label, her career is effectively over."

New York Supreme Court Justice Shirley Kornreich shot down the injunction today, telling Geragos, "You're asking the court to decimate a contract that was heavily negotiated and typical for the industry," according to THR.

Lawyers call Sony's promise that Kesha can work without Dr. Luke "elusive"

But even a heavily negotiated contract could contain restrictive clauses that would halt Kesha's musical output. Last November, The Verge's Jamieson Cox wondered why, given the circumstances surrounding the lawsuit, Kesha couldn't just independently release a free mixtape. But because Kesha was just a teenager when she began her career, she may have been unable to negotiate the contractual terms that would have allowed her that freedom.

In her decision, Kornreich noted that Sony has already given Kesha the opportunity to record without Dr. Luke, but Kesha's lawyers called that an "elusive promise," according to THR. Kesha's last solo album, Warrior, came out in December of 2012.

Correction, 2:43PM ET: An earlier version of this post said that Jim Urie was the CEO of UMG. He is the former CEO of UMG Distribution. We regret the error.