At what point does an extraterrestrial look toward the skies for signs of God and not her home planet? That’s the subject of “Praying,” Kesha’s first single in nearly four years, which comes on the heels of her protracted legal battle with former producer Dr. Luke and sexual assault allegations against him. This crisis of faith might seem out of place for Kesha, who once discussed her sexual encounter with a ghost and whose forthcoming album Rainbow features a bold, psychedelic cover replete with flying UFOs—but it delivers a unique brand of spirituality that never strays too far from the ethereal goddess we were first introduced to as she brushed her teeth with a bottle of Jack.

It was a little over a year ago that a judge denied Kesha’s request for a release from her contract with Dr. Luke after she’d accused her producer of 10 years of sexual assault, battery, gender violence, and emotional abuse, going so far as claiming she’d attempted suicide due to his relentless body-shaming of her. Fans immediately rallied alongside her, prompting a “Free Kesha” movement, but it had no effect on the judge’s decision, which stated: “You’re asking the court to decimate a contract that was heavily negotiated and typical for the industry. I don’t understand why I have to take the extraordinary measure of granting an injunction.” So while Kesha is now free to record new music, she still owes Dr. Luke’s label Kemosabe Records three albums and Rainbow will be released under it. It’s easy to see then why Kesha’s latest offering is concerned with the loss of control—one that only a higher power can remedy.

Loss of faith and the self has been always been ripe for pop music, particularly given the connections between baring one’s soul as a pop artist and spiritual confession. It’s even prominent in the work of singers who don’t identify as religious, like George Michael’s biggest hit of his career: 1987’s “Faith.” In an interview with British GQ he once confessed, “I can’t bear Catholicism,” and he often bore a single crucifix dangling from his ear as he swiveled his hips in tight denim jeans and a leather jacket. Kesha follows in the tradition of the late queer icon, having come out as bisexual in 2013 and often possessing a similar rock and roll swagger.

But pop music shows us it’s possible to be religious without the sturm und drang of biblical texts and antiquated rituals. In an essay to her fans on Lenny Letter, Kesha described her personal relationship with religion: “For me, God is not a bearded man sitting in the clouds or a judgmental, homophobic tyrant waiting to send everyone to eternal damnation. God is nature and space and energy and the universe. My own interpretation of spirituality isn’t important, because we all have our own. What matters is that I have something greater than me as an individual that helps bring me peace. This is one of the reasons why I love swimming way, way out into the middle of the ocean and just letting the sea carry my body. It is my greatest form of surrender to the universe, a full-body prayer—or meditation.” The beauty of entering Kesha’s universe is God can be an entrancing EDM beat, a Lovecraftian aberration, or simply a universe we’ve yet to physically encounter but can travel to in meditation.

The first time I saw Kesha in concert was during Rihanna’s Last Girl on Earth Tour in 2010. As much as I loved Rihanna, I became completely enthralled by Kesha’s punk rock, no fucks given demeanor. She oozed a confident sexuality with over-teased ’80s hair, plenty of glitter, and tongue-in-cheek songs like “Tik Tok.” But bubbling beneath the party anthems were songs like “Dancing with Tears in My Eyes” that tapped into the soul of someone looking for faith, love and solace in their music. With “Praying,” she has found that solace and now wishes it not only for her tormenters, but her loved ones. “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,” she sings.

That sadness has always lingered beneath Kesha’s expertly crafted pop songs, whose glittery sheen made most people underestimate her. It’s unfortunate that Kesha’s merits as an artist didn’t truly come into the public consciousness until they were openly debated amidst her legal woes. But it’s evident from “Praying” that the journey hasn’t broken her. The video is bursting at the seams with dazzling visuals and potent lyrics like: “You brought the flames and you put me through hell / I had to learn how to fight for myself / And we both know all the truth I could tell / I’ll just say this is I wish you farewell.” It’s a kiss-off to not only Dr. Luke, but also those malevolent self-doubts that ate away at her soul as she fought to validate not only her music, but her mere existence.

Describing what this new era means to her, Kesha said: “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.”

The beauty of listening to “Praying” is you can tell it’s a gift for her as well.