Selma Blair announced her exit from "Dancing with the Stars" Season 31 on Monday after she received her MRI results that suggested she should not continue on the show.

"You know I've been monitored and in touch with my doctors this whole process," Blair said in a pre-recorded video played during the episode, People reported. "I had these MRIs and when the results came back, it just all adds up to I can't. I can't."

She added, "I can't go on with the competition. I pushed as far as I could. With a chronic illness, you do have special considerations, and my body has taken a hit. It's way too much for the safety of my bones. I could do extensive damage that I, of course, do not want."

Despite having health concerns, the 50-year-old actress performed for one last time with her dance partner, Australian-American professional dancer Sasha Farber, during Monday's episode. The actress danced to the "What the World Needs Now is Love" music track, which was originally dropped by singer Jackie DeShannon in 1994.

Blair said her final dance was "for everyone that has tried and hoped they could do more, but also, the power in realizing it's time to walk away." She added, "I am so, so grateful to be able to do one last gentle dance."

Following the performance, the "Dancing with the Stars" judges - Derek Hough, Len Goodman, Bruno Tonioli and Carrie Ann Inaba - praised the actress and thanked her for being a part of the show.

"This competition is tough for everyone, but if the others have climbed hills, you have climbed mountains," Goodman said, while Hough added, "You've brought nothing but joy to everyone, always with a smile... thank you for sharing this journey with us all."

Inaba called Blair a "living breathing, elegantly dancing miracle," while Tonioli said she was an inspiration for everyone.

The actress shared that most people don't understand what the show meant for the contestants.

"To see the audience, react to each and every one of us and our efforts, it's so heartening. I wish I could stay and learn," she told host Alfonso Ribeiro. "I am so proud of everyone and I am so proud of this audience for seeing us."

Blair was diagnosed with multiple sclerosis in 2018. She has been dealing with health issues throughout the season. Earlier this month, the actress revealed she "pass out a lot."

"The thing is, I pass out a lot," Blair said in an interview with ET. "It's part of the reason I have Scout and it doesn't mean I lose consciousness [or] it's a whole ambulance experience, it's something that I lose my vision, gravity pulls me down and I'm very disoriented and gone for a spell."

Selma Blair Sasha Farber DWTS 31
Selma Blair and Sasha Farber are competing on Season 31 of “Dancing With the Stars.” ABC/Lou Rocco