Miley Cyrus said she knew she had outgrown her breakout role on the Disney Channel as “Hannah Montana” after losing her virginity.

In an interview with Elle magazine published Thursday, the 26-year-old singer-songwriter and actress said she “felt ridiculous” about playing the role of a teenager who lived a secret double life as a famous pop star around the age of 18.

MILEY CYRUS GETS REAL ABOUT MARRIAGE TO LIAM HEMSWORTH, FEMINISM AND CLIMATE CHANGE 

“The minute I had sex, I was kind of llike, I can’t put the f---ing wig on again,” she said. “It got weird. I just felt like … I was grown up.”

Miley Cyrus as "Hannah Montana" at the Licensing International Expo in New York on June 19, 2007. (AP Photo/Mary Altaffer, File)

While Cyrus said she was done with the role at the time, she is no longer “ashamed” of it, feeling like she had finally earned enough respect as a musician.

“I feel like I’m not ashamed of that anymore. It’s pretty cool when you hear Cardi B was listening to Hannah Montana when she was in high school. That s--- makes me happy.

CLICK HERE TO GET THE FOX NEWS APP 

Cyrus opens up about other major life events in the August issue, including her Malibu home burning down in a devastating California wildfire and her marriage to actor Liam Hemsworth.

Fox News’ Jessica Napoli contributed to this report.