Tori Spelling finally knows exactly why her character on "Beverly Hills, 90210" stayed a virgin for all those years. 

Spelling played Donna Martin on the hit show and learned that her late father, Aaron Spelling, had suggested she abstain from sex.

"I remember very clearly when he said to me . . . ‘Donna should be a virgin,’" "90210" producer and writer Charles Rosin revealed on the latest episode of Spelling's "9021OMG" podcast.

"And it was like, ‘Yes, absolutely she should.'"

TORI SPELLING CLAIMS RENTED HOME'S 'MOLD INFECTION' HAS BEEN 'SLOWLY KILLING' HER FAMILY FOR YEARS

Aaron Spelling with Tori Spelling split with photo of "90210" cast

Tori Spelling revealed her dad Aaron Spelling was behind her "90210" character remaining a virgin. (Ray Mickshaw/WireImage for PMK/HBH: mikel roberts/Sygma via Getty Images)

Spelling admitted she "never knew" where the idea came from. 

"I always suspected, and people say, like, 'He kept his daughter a virgin.' But was it literally his idea?" she asked.

Rosin replied, "Oh, absolutely!" 

He then explained to Spelling and her podcast co-host Jennie Garth, who played Kelly Taylor on the hit series, how the proposal was received by the other show writers.

"We just went, 'Oh, yeah, that makes perfect sense!' Because we were able now to differentiate you."

Cast of "Beverly Hills, 90210"

The cast of "Beverly Hills, 90210," Tori Spelling, Brian Austin Green, Ian Ziering, Jennie Garth, Jason Priestley, Gabrielle Carteris, the late Luke Perry and Shannen Doherty. (Mikel roberts/Sygma via Getty Images)

'90210' STAR JENNIE GARTH SHARES HOW MIDWESTERN VALUES GUIDE HER PARENTING

"What I loved about it. . . . You would be dressed, you know, provocatively, stylishly . . . but it didn’t matter," Rosin explained, referencing Donna’s wardrobe. "Because certainly, if you were, for whatever reason, a virgin at that point, you could dress like that you just you know would blend in, but not actually be ‘doing the deed,’ as it were."

Spelling starred as Donna on "90210" for the show's entire 10-season run from 1990 to 2000. However, her character was not a virgin for the entire series. Donna lost her virginity in season 7 on her last night of college to her long-time boyfriend David, played by Brian Austin Green.

Jennie Garth and Tori Spelling at FOX Summer TCA

"90210" producer Charles Rosin told Tori Spelling, left, and Jennie Garth, right, it had been Aaron Spelling who had said, "Donna should be a virgin." (Gregg DeGuire/FilmMagic)

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Tori Spelling smiling and looking at Brian Austin Green as they pose at an event

Tori Spelling's "90210" character Donna Martin lost her virginity in season seven to her boyfriend David, played by Brian Austin Green. (Jeff Kravitz/FilmMagic)

Her conversation with Rosin was not the first time the 50-year-old spoke out about her thoughts on her character's celibacy. 

In 2013, she told Vulture that she thought it had been because "once we established that she was a fan favorite, people really started relating to her."

She continued, "Teens constantly would approach me and tell me that they were virgins, and they had times where they were scared that being a virgin would make them seem uncool, but then Donna made it okay."

Aaron, Tori and Candy Spelling

Tori Spelling with her parents, Aaron Spelling and Candy Spelling in 2002. Aaron Spelling died in 2006. (Photo by Gregg DeGuire/WireImage)

However, that does not mean Spelling wanted Donna to stay one forever. 

"We knew it was inevitable," Spelling told the outlet about Donna finally having sex. "I think at one point I jokingly said, ‘Come on, Dad. It’s time.’"

In real life, the cast members of the '90s show were pretty much all sleeping with each other, Spelling claimed in her 2008 memoir "sTORI TELLING," according to People. A fact she said her dad knew nothing about.

CLICK HERE TO GET THE FOX NEWS APP

Tori Spelling, Jason Priestley, Gabrielle Carteris, Ian Ziering, Jennie Garth and Brian Austin Green

From left to right, Tori Spelling, Jason Priestley, Gabrielle Carteris, Ian Ziering, Jennie Garth and Brian Austin Green in 2019. (Dominik Bindl/Getty Images)