Playing a brat on a hit TV show saved Alison Arngrim during one of the darkest periods of her life.

The former child star played "Nasty" Nellie Oleson, the villainous rival to Laura Ingalls (Melissa Gilbert) in the ‘70s series "Little House on the Prairie." 

The actress said playing a mean girl was an unlikely therapy, allowing her to channel the anger she felt after being physically and sexually abused while growing up.

Arngrim, 61, has previously detailed her struggles in the 2010 memoir, "Confessions of a Prairie B----: How I Survived Nellie Oleson and Learned to Love Being Hated." She has been traveling across the country for her one-woman show, leading up to the 50th anniversary reunion of "Little House" in March.

‘LITTLE HOUSE ON THE PRAIRIE’ STAR MELISSA GILBERT ON EMBRACING A SIMPLER LIFE: ‘I DON’T MISS HOLLYWOOD’

A close-up of Alison Arngrim wearing a pink dress as Nellie Oleson

Alison Arngrim starred as Nellie Oleson in "Little House on the Prairie." (NBCU Photo Bank/NBCUniversal)

"As I talked about in the book, I was bullied. I was shy. I’d been abused as a child," the star told Fox News Digital. "And here I was … playing this horrible person. The yelling, the screaming and the breaking [of] things, the smashing up of whole rooms and letting it all out. 

"Being able to release all of this anger, all of this rage. ... Anyone who has survived any kind of childhood abuse knows. … Where do we put this displaced anger? Where do you put this rage? And this is what just kills people. It’s just awful. There’s nowhere for it to go, and [it takes] years of therapy to get that out.

Melissa Gilbert fighting Alison Arngrim in character in a pool

The temper tantrums of her character proved to be a much-needed outlet for Alison Arngrim. (NBCU Photo Bank/NBCUniversal via Getty Images via Getty Images)

"Well, here I was going to work every day and yelling and screaming and smashing stuff up and getting paid for it and rewarded for smashing everything in this room," Arngrim shared. "It was a very freeing feeling. … I don’t know what I would’ve done. 

"It was so helpful to [me] as a teenager, which is the hardest period for everybody, especially if you’re an abuse survivor, to have this outlet … to put all my anger and angst and tension and let it all out. I have to admit, it did absolute wonders for me. It really did."

The Michael Landon-led series chronicled the adventures of the Ingalls family in the 19th-century Midwest. It ran from 1974 to 1983.

Nellie Olesone smiling wearing a black blouse and a patterned gold blazer

Alison Arngrim is heading to Simi Valley, Calif., in March for the 50th anniversary of "Little House on the Prairie." (Ruby Wallau)

It wouldn’t be until her 40s Arngrim went public with her story. She’s on the board of directors for the National Association to Protect Children, a nonprofit that works for legislation to protect children from abuse.

After "Little House," Arngrim was typecast and nicknamed "Pioneer Barbie" by casting directors who couldn’t see past her blonde ringlets. But she escaped the dreaded child star curse that has always loomed over Hollywood. Some of her peers didn’t.

Alison Arngrim in a red shirt and white shorts posing in front of a matching car

Alison Arngrim  outside her parents' home March 16, 1979, in Los Angeles. (Paul Harris/Getty Images)

"I was very lucky," she admitted. "I had my money. I had a trust fund. My money was not stolen. The people I’ve talked to, the other child actors, have had severe challenges and really hard times. I noticed one of the most unpleasant factors is people who had all of their money stolen by their parents or by a manager.

"[Some] didn’t even want to be in show business or be an actor but were made to do so as small children. So, they told themselves, ‘Well, at least when I’m 18, I’ll get a check, and I’ll get out of here.’ And then they turn 18 and there’s nothing. … [Their parents or manager] spent it. … I didn’t have that [problem]. I knew where my money was."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Alison Arngrim speaking to a mic with a Nellie Oleson wig

After "Little House," Alison Arngrim pursued stand-up comedy. (Giacinta Pace/NBCU Photo Bank/NBCUniversal)

Still, it wasn’t always easy being known as "Nasty Nellie" even when cameras stopped rolling.

"It was hard," Arngrim explained. "I’ve been this person, and now who am I? I’ve been assigned an identity. I am this person now, so I had to figure out who the heck I was. … So you go out and get different jobs and meet people.

"When you travel, you get to meet all kinds of different people from all different careers and walks of life. You get exposed to other kinds of life. … You get out of the Hollywood bubble and try to meet normal people. … That really helps.

A close-up of Alison Arngrim smiling as Nellie Oleson

In real life, Alison Arngrim was viewed as a villain by many fans of "Little House." (NBCU Photo Bank)

"I also had a great advantage," she added. "I kept all my friends from school when I was on the show. I stayed enrolled at my old school. I still had these friends from junior high and high school. Many of whom I’d known since elementary school. 

"That was a whole pool of people who knew me way before I was Nellie who were still my friends and just knew me as me. … I think isolation is a really big factor for people who were child stars and have problems later. At least I didn’t experience the isolation."

Alison Arngrim in a green dress next to Melissa Gilbert wearing a patterned dress and glasses

Melissa Gilbert, left, and Alison Arngrim July 2, 2022, in Burbank, Calif.  (Albert L. Ortega)

Arngrim said making friends who didn’t watch "Little House" kept her grounded over the years. She said her husband Bob had only started watching the show after they married in 1993.

And while she survived child stardom, Arngrim said she had "a lot of work to do."

"I absolutely went to therapy," she said. "I had abuse and everything else to deal with, but I did find my way. But as I said, I had great advantages. I had the trust fund, and I had friends. And those are biggies, frankly."

CLICK HERE TO GET THE FOX NEWS APP

Mellisa Gilbert and Alison Arngrim in character drenched in a pond

Melissa Gilbert, left, as Laura Elizabeth Ingalls Wilder and Alison Arngrim as Nellie Oleson. (NBCU Photo Bank)

On set, Arngrim received support from her castmates and made friendships that have lasted to this day. But it took a while before fans of the series warmed up to her, she said. She said after filming her first episode, she received an unexpected review from a classmate.

"This girl … just screams at me as I walked, ‘You b----!’" Arngrim recalled. "And I realized this was it, this was how it was going to be. … So I simply looked up at her and said, ‘Thank you!’ and bowed. And people did hate me."

Alison Arngrim scheming as Nellie Oleson with Katherine MacGregor in character looking surprised

"Little House" saw a resurgence during the coronavirus pandemic. (NBCU Photo Bank/NBCUniversal)

"This was a very emotional show," she shared. "People connected to it. They feel like the characters are their friends or their family. … So you can imagine what they thought of me. … I was in the Hollywood Christmas parade and someone threw a McDonald’s cup of orange soda at my face. They had really good aim. Boom, right in the side of the head, McDonald’s orange soda. I got beat up. People threw things. People called me horrible things to my face every single day."

The cast of Little House on the Prairie in costume getting ready to film

"Little House on the Prairie" aired from 1974 to 1983. (NBCU Photo Bank)

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

"And as you see, I’m still laughing," she said, smiling. "I knew it wasn’t real. I was friends with Melissa Gilbert. We’d beat each other up all week and then go to each other’s houses for slumber parties and make fudge and watch TV."

Today, Arngrim is looking forward to reuniting with her former castmates and reliving the good times.

"If you had told me or any of the actors that the show would still be airing, we would have said, ‘Do they still have TV in 50 years?’" she chuckled. "We didn’t think it’d still be running in 10-20 years. … But we’re so thrilled. … When times get hard, you'll always have ‘Little House on the Prairie.’"