Kesha's emotional performance at this year's Grammys was in the works long ahead of Sunday's ceremony, with its origins tracing back to late last year when the pop singer-songwriter played to a sold-out crowd at the Hollywood Palladium.
It was the final stop of her Rainbow tour — a trek that for the singer and her fans seemed improbable after a tumultuous legal battle with her one-time mentor and collaborator Dr. Luke stalled her career for a number of years.
In the audience was Ken Ehrlich, the Grammy telecast's longtime executive producer. Ehrlich had watched Kesha rise to pop stardom with boozy party anthems such as "Tik Tok," "Your Love Is My Drug" and "Die Young" and was never sold on the singer — until that night in November at the Palladium.
"I'd seen her years ago and I was impressed, but thought she had some growing to do. When I saw her at the Palladium, she was at the top of her game," he recalled. "She was strong, humble and a great showman. That's what got me."
Ehrlich wanted the singer on this year's telecast, especially after hearing the Grammy-nominated "Rainbow," the first body of work she released since stunning the pop world in 2014 by alleging a decade of sexual, physical and mental abuse at the hands of Luke. He vehemently denied the claims.
When Ehrlich approached the singer about performing, she chose her stunning, redemptive ballad "Praying" — a cathartic record that many have resoundingly seen as the singer's response to the turmoil that put her life and career on pause — and sent Ehrlich a reference track to the version she planned on staging.
"It gave me goosebumps," Ehrlich said. "It was powerful … and in context with what's happening."
As the #MeToo and Time's Up movements have brought the worlds of Hollywood, politics and the media to their knees in recent months, there's been increased scrutiny for the music world to make change. Situations like Kesha's and R. Kelly's, who has been trailed by sexual misconduct allegations for two decades, are being reexamined.
Although Kesha's case garnered high-profile coverage, it took more than a year of litigation before the singer saw a windfall of support from her peers and the public after video of the singer sobbing on the stand during a 2016 hearing made the industry pay attention.
In the 2014 suit filed in Los Angeles County Superior Court, she alleged that years of abuse resulted in an eating disorder and a stint in rehab that sidelined her once white-hot career.
According to the lawsuit, on one occasion, "Dr. Luke instructed [her] to take what he described as 'sober pills.' ... [Kesha] took the pills and woke up the following afternoon, naked in Dr. Luke's bed, sore and sick with no memory of how she got there."
The suit continued with similar, detailed claims dating back to when she was 18 and first moved to Los Angeles, opening a nasty legal battle in which Dr. Luke, whose full name is Lukasz Sebastian Gottwald, countersued in New York for defamation and breach of contract. Kesha's Los Angeles lawsuit was dismissed in 2016 after a judge ruled that even if the allegations were true, the five-year statute of limitations had run out.
"Kesha is very brave," Cyndi Lauper said after rehearsing with the singer for Sunday's performance.
Lauper, Camila Cabello, new artist nominee Julia Michaels, Andra Day, Bebe Rexha and members of the Resistance Revival Chorus — a collective of women who come together to sing protest songs — joined Kesha for the performance that was an explicit nod to #MeToo and Time's Up.
Lauper was one of the first calls Kesha made to join her for Sunday's performance; the two women have been friends for years. "We actually asked her to do [a run in the musical] 'Kinky Boots' but she couldn't because of contractual issues," Lauper said.
"I'm so glad she didn't do it because … she needed to go away and make this record. And I'm so proud of her that she did this."
Kesha's performance added to a call to action for the music industry that began in the days before the telecast when an open letter was circulated among the music industry by a group calling itself the "Voices of Entertainment."
Taking its cues from the Time's Up campaign that defined the Golden Globes, the group requested attendees and nominees wear white roses in support of "equal representation in the workplace, for leadership that reflects the diversity of our society, workplaces free of sexual harassment and a heightened awareness of accountability."
"It's [about] equality and respect. I know some people are saying the music industry was slower to keep up than other industries, but we haven't had as many award shows," Lisa Loeb said backstage. "Plus, a lot of us have been spreading this in our music and in our interactions with fans every day."
At a private rehearsal on Friday, Kesha was overcome with tears during a run through of "Praying" alongside her choir of activists and pop star peers.
With encouragement from Lauper and Cabello, who both stretched out their arms to embrace the singer, Kesha tilted her head back and let out a roaring vocal that stilled the dozen or so people who were seated in the audience during rehearsals.
"Wow, I'm speechless," Grammys show host James Corden said after the singer completed a full pass of the song.
"This is a powerful moment of women coming together," Lauper said. "We need equality in the workspace. We need a safe workspace. We need more women in the workspace.
"We need to equalize the power, and men have to be taught that women aren't to be treated unfairly," she continued. "End of … story."
For more music news follow me on Twitter:@GerrickKennedy