Anne Hathaway says she had a miscarriage in 2015

  • Oops!
    Something went wrong.
    Please try again later.

Anne Hathaway said she suffered a miscarriage in 2015 while she was portraying a pregnant woman in the Broadway show "Grounded."

Hathaway, 41, opened up about "the pain" she felt while she was trying to get pregnant in an interview Vanity Fair published this week.

“The first time it didn’t work out for me," Hathaway said. "I was doing a play and I had to give birth onstage every night."

At the time, she said, she chose to share the news with her friends when they visited her backstage.

“It was too much to keep it in when I was onstage pretending everything was fine. I had to keep it real otherwise. ... So when it did go well for me, having been on the other side of it — where you have to have the grace to be happy for someone — I wanted to let my sisters know, ‘You don’t have to always be graceful. I see you and I’ve been you.’”

She said, “It’s really hard to want something so much and to wonder if you’re doing something wrong."

She said she was surprised to learn how many of her friends have gone through the same ordeal and how prevalent miscarriages are.

“I thought, Where is this information? Why are we feeling so unnecessarily isolated? That’s where we take on damage. So I decided that I was going to talk about it,” she said.

Ten percent to 20% of pregnancies end in miscarriage, according to the Mayo Clinic. But the actual statistic is higher because many miscarriages occur before people realize they are pregnant, the Mayo Clinic says on its website.

Hathaway has two sons, ages 8 and 4, with her husband, producer Adam Shulman.

A spokesperson for Hathaway did not immediately respond to a request for comment Tuesday.

In the interview with Vanity Fair, Hathaway also discussed her upcoming project "The Idea of You," which she produced and stars in alongside Nicholas Galitzine.

She said she credits filmmaker Christopher Nolan with keeping the momentum in her career rolling when she had become a target of critics online after her Oscar campaign for “Les Misérables” in 2012.

“A lot of people wouldn’t give me roles because they were so concerned about how toxic my identity had become online,” Hathaway said. “I had an angel in Christopher Nolan, who did not care about that and gave me one of the most beautiful roles I’ve had in one of the best films that I’ve been a part of.”Hathaway was referring to the part of NASA scientist Amelia Brand in Nolan’s “Interstellar” in 2014.

This article was originally published on NBCNews.com