Get the latest from TODAY

Melissa Gilbert, who rose to fame as the star of “Little House on the Prairie,” is dropping out of the race for a congressional seat in Michigan.

The 52-year-old actress said the move was prompted by the advice of her doctors, who said she will need surgery for injuries she suffered to her head and neck in accidents during 2012 that have worsened.

“While I have received the best treatment and therapy I could have asked for, those injuries have only gotten worse,” Gilbert said in a statement to the Detroit Free Press. “As much as it breaks my heart to say this, my doctors have told me I am physically unable to continue my run for Congress.”

Gilbert told People that one of the accidents occurred from whiplash and a concussion she sustained after a fall on “Dancing with the Stars.” The other took place months later after part of the balcony she was standing on from her rental home collapsed over her head.