Taylor Swift has donated $250,000 to Kesha, after a New York judge rejected an injunction that would have allowed the singer to record music without Sony Music and longtime producer Dr. Luke. In a statement to Rolling Stone, a spokesperson for Swift said the money would help Kesha "with any of her financial needs during this trying time."

Kesha has been engaged in a legal battle with Sony and Dr. Luke (aka Lukasz Gottwald) since 2014, when she sued the producer for sexual assault and battery. Dr. Luke has denied the allegations and filed a countersuit against Kesha for defamation and breach of contract. Kesha filed a preliminary injunction motion in 2015 that would have allowed her to terminate or edit her contract with Sony Music, with her lawyers arguing that the singer could not record new music while the lawsuits were ongoing, and that her career would be "irreparably harmed" if she didn't. New York Supreme Court Justice Shirley Kornreich denied the motion on Friday, telling Kesha's lawyers: "You're asking the court to decimate a contract that was heavily negotiated and typical for the industry."

#FreeKesha this is only gonna make you stronger, you brave and beautiful girl. Prayers are with you @KeshaRose — Demi Lovato (@ddlovato) February 20, 2016

Swift is one of several pop stars who have publicly supported Kesha following last week's ruling. Lady Gaga, Demi Lovato, Grimes, Lorde, Lily Allen, and Kelly Clarkson have all expressed support for the singer on Twitter, where her fans have rallied under the #FreeKesha hashtag. "There are people all over the world who love you Kesha," Lady Gaga wrote. "And I can say truly I am in awe of your bravery."