Hayden Panettiere, who died recently at age 36, endured debilitating back pain for 20 years stemming from an on-set accident when she was a child actor. The pain originated from a fall she sustained in South Africa while filming the 2005 movie “Racing Stripes,” according to her memoir.

Panettiere played Channing Walsh, a 16-year-old who trains a zebra for racing. She developed a bond with the zebra, named Sam, despite the animal having previously injured two stunt doubles. Unfazed, Panettiere mounted the zebra without apprehension.

“Trusting that he’d always be the angel I knew him to be, I mounted him without a worry in the world,” she wrote in “This is Me: A Reckoning.” “At first things went fine. But when I approached what we called the ‘mounting pads,’ which were elevated platforms that helped us mount and dismount, Sam bucked – at the exact moment I tried to hop off him.”

Panettiere's foot became caught in the stirrup, causing her to swing into the air and then fall hard. “I felt an excruciating pain shoot through my back,” she recalled. Despite being in pain, she told the assembled crew she was fine, acknowledging, “It was a total lie. I was injured, in pain, and screwed.”

Aware of the distance to the nearest hospital, she kept her injuries to herself. In her memoir, published three months before her death, she stated, “Over twenty years later, these injuries still bother me.”

The accident had lasting consequences, with a source close to the actress noting its persistent effects. When the old injury resurfaced with pain, opioid use became part of her story, according to the source. Panettiere had been open about her struggles with addiction, which began shortly after “Racing Stripes” was filmed, when she was 15.

In the year leading up to her death, Panettiere reportedly complained of back pain and was observed using crutches in March, attributing it to pinched nerves in her lower back. In May, she revealed that the injuries had resulted in two vertebrae being pushed into her neck.

Panettiere died on Sunday, five days before her 37th birthday, following a cardiac arrest after a suspected overdose. Authorities reported she was taking a “bag of medication” at the time of her death. An autopsy has been performed, with toxicology results expected within 12 weeks.