Mariska Hargitay, 60, who has starred as Olivia Benson in the “Law & Order” franchise since 1999 — making her the longest-running character in the longest-running prime-time drama — said that she’s been “deeply” impacted by the show. 

“When I started the show, I wasn’t aware of how deeply it would go into me,” Hargitay said in a recent interview with “SVU” fan Selena Gomez published Monday in Interview magazine.

Hargitay, who has been married to “Blue Bloods” actor Peter Hermann since 2004, added, “My husband Peter is always like, anytime I go anywhere, my first question is, ‘What’s the crime rate here?’ So it’s on the brain.”

Mariska Hargitay as Olivia Benson and Ice T as Odafin "Fin" Tutuola in "Law & Order: SVU."
Mariska Hargitay as Olivia Benson and Ice-T as Odafin “Fin” Tutuola in “Law & Order: SVU.”Francisco Roman/NBC

Mariska Hargitay filming "Law & Order: SVU."
Mariska Hargitay filming “Law & Order: SVU.”Jose Perez / SplashNews.com

She continued, “There’s been times when I didn’t know how to protect myself, and I think I was definitely a victim of secondary trauma from being inundated with these stories and knowing that they were true. Those were the parts that I didn’t know how to metabolize, just because of the sheer volume of it.”

On the show, Benson is constantly solving heinous sex crimes, and in real life, that motivated Hargitay to create the Joyful Heart Foundation in 2004.

The foundation’s mission is “to transform society’s response to sexual assault, domestic violence, and child abuse, support survivors’ healing, and end this violence forever.”

To date, it has aided in solving thousands of sex crimes.

 Mariska Hargitay as Captain Olivia Benson in "Law & Order: SVU."


Mariska Hargitay as Captain Olivia Benson in “Law & Order: SVU.”Virginia Sherwood/NBC

Mariska Hargitay, Ice-T, Octavio Pisano, Juliana Aiden Martinez, and Kevin Kane filming scenes for "Law & Order: Special Victims Unit."
Mariska Hargitay, Ice-T, Octavio Pisano, Juliana Aiden Martinez and Kevin Kane filming scenes for “Law & Order: Special Victims Unit.”Jose Perez / SplashNews.com
The actress said that with her foundation, “I would feel like, well, at least I’m doing something about it.”

Hargitay told the “Only Murders in the Building” actress that when she started on the show, “I was not the boss and I had no power.”

“I was also overwhelmed and scared and kind of looked up to everybody. It was more of a patriarchal society 25 years ago,” she explained. “They set the rules in their universe and we just showed up in it. But as I grew and evolved, both as Mariska and as Olivia Benson, I think my favorite part is that as I evolved, I didn’t give away pieces of myself.”

Gigi Hadid, Martha Hunt, Hailee Steinfeld, Cara Delevingne, Selena Gomez, Taylor Swift, Serayah McNeill, Lily Aldridge, Mariska Hargitay and Karlie Kloss
MTV Video Music Awards in  2015.
Gigi Hadid, Martha Hunt, Hailee Steinfeld, Cara Delevingne, Selena Gomez, Taylor Swift, Serayah McNeill, Mariska Hargitay, Lily Aldridge and Karlie Kloss at the MTV Video Music Awards in 2015.Rob Latour/Shutterstock
Hargitay added that now, she’s “in this very unique place of being a total badass, I know my worth, I know my power, I know what I have to offer, and I’m totally comfortable with my vulnerability, with all the ways I still feel like a little girl. That’s a really peaceful place to be.”

“Law & Order: Special Victims Unit” Season 26 premieres on Thursday, Oct. 3 (9 p.m.) on NBC.