Three years since she filed a lawsuit alleging producer Lukasz "Dr. Luke" Gottwald abused her, Kesha is addressing the controversy in a new song and an emotional open letter.

The complicated legal dispute — which spans three states and involves multiple separate suits — started when the singer-songwriter filed a lawsuit against Gottwald in Los Angeles in October 2014, alleging sexual, verbal, and contractual abuse. He has never been charged and has steadfastly denied the claims.

In response, Gottwald filed his own lawsuits in New York against Kesha and in Tennessee against her mother for defamation, breach of contract and tortious interference. His defamation lawsuit in New York prompted Kesha to file a countersuit citing abuse and gender-related hate crimes, but her claims were dismissed in April 2016 because of jurisdictional issues and an expired statute of limitations.

Kesha performs onstage during the 2017 Firefly Music Festival on June 17, 2017 in Dover, Delaware. Kevin Mazur / Getty Images for Firefly

This past June, Gottwald dropped the defamation lawsuit he’d filed in Tennessee against Kesha’s mother. He still has a suit pending against Kesha for breach of contract.

Kesha dropped her initial California lawsuit against Gottwald and Sony Music Entertainment in August 2016 in hopes of going back to making music, her lawyer told Rolling Stone in August.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Gottwald's attorneys attributed the decision to a different motivation.

"If Kesha is voluntarily dismissing her claims in the California case, it is because she has no chance of winning them," Gottwald attorney Christine Lepera said in a statement to Rolling Stone at the time. "Kesha never should have brought her false and meritless claims against Dr. Luke in any court."

Fast forward to July and "Praying," Kesha's first single since the high-profile legal battle. In it, she sings of overcoming obstacles and learning to let go.

Related: Kesha Accuses Hitmaker Dr. Luke of ‘Exploitation’ and Abuse

"I've found what I had thought was an unobtainable place of peace," Kesha wrote in an emotional letter published in Lena Dunham's feminist newsletter Lenny Letter to go along with the release of the song. "This song is about coming to feel empathy for someone else even if they hurt you or scare you. It's a song about learning to be proud of the person you are even during low moments when you feel alone. It's also about hoping everyone, even someone who hurt you, can heal."

In "Praying," the singer addresses a disembodied aggressor she claims "put [her] through hell," but offers her prayers in a conciliatory chorus — "I hope you're somewhere praying, praying / I hope your soul is changing, changing / I hope you find your peace / Falling on your knees, praying."

Dr. Luke and and Kesha at the 28th annual ASCAP (American Society of Composers, Authors and Publishers) Pop Music Awards in Hollywood, California on April 27, 2011. Mario Anzuoni / Reuters file

"If you feel like someone has wronged you, get rid of that hate, because it will just create more negativity," Kesha said in her letter. "One thing that has brought me great relief is praying for those people. Being angry and resentful will do nothing but increase your own stress and anxiety — and hate is the fuel that grows the viruses. Don't let anyone steal your happiness!"

But the song also betrays hints of anger that may have been spurred by the lengthy legal dispute:

"And you said that I was done / Well, you were wrong and now the best is yet to come / 'Cause I can make it on my own / And I don't need you, I found a strength I've never known / I've been thrown out, I've been burned / When I'm finished, they won't even know your name."

Kesha also opens up in her letter about her struggles with "intense" anxiety and depression, and an eating disorder that sent the singer to rehab in January 2014. But rather than grieving, the overall tone of the text is one of hope.

"Finding the strength to come forward about these things is not easy, but I want to help others who are going through tough times," she wrote.

"In the past, I've always felt like I was trying to prove something, trying to be someone I thought people wanted me to be, but on this record, I'm just telling the truth about my life. This album is me. The most raw and real art I have ever created, and now it's my gift to you. I hope you love it. Thank you for not giving up on me. We made it."