If there’s one person who knows what Kesha’s been through, it’s her mother, Rosemary “Pebe” Sebert.

She’s been by her pop-star daughter’s side through her ongoing legal battle with record producer Lukasz “Dr. Luke” Gottwald and her much-publicized spell in rehab for an eating disorder in 2014. On Monday night, Pebe — a singer-songwriter herself — took to the stage at Hammerstein Ballroom to offer her gratitude to the sold-out crowd for helping Kesha through the darkness.

“Thank you for supporting my daughter and giving her a reason to live,” she told the 2,200 fans watching the show, the latest on Kesha’s current American tour. Pebe and her daughter then performed a tender version of the ballad “Godzilla,” from Kesha’s triumphant third album, “Rainbow,” which was released in August.

It was a touching high point to an already emotional show in which Kesha’s fans, often referred to collectively as “Animals,” played a huge part.

Kesha filed a civil suit against Dr. Luke in 2014 on charges related to sexual abuse, while he countersued for defamation. She’s since dropped many of the charges, but her fans showed solidarity by standing outside the courtroom during the hearings. Some even raised money to buy Kesha out of her contract with Dr. Luke’s label, Kemosabe.

During Monday’s 90-minute show, the crowd roared for their idol, who’s in the best form of her life. They chanted her name and sang passionately along to many of the songs, particularly the recent single “Praying,” which many interpreted as a thinly veiled kiss-off to Dr. Luke.

Kesha didn’t comment directly on her ongoing legal battles but instead profusely thanked her followers. “A few years ago, I was sitting in the floor of a rehab facility with a very severe eating disorder,” the 30-year-old said. “And I was dreaming of a day like today.”