Carrie Underwood was facing what she worried would be her fourth miscarriage in less than two years, when she curled up next to her 3-year-old son and prayed like she had never prayed in the past.

The 35-year-old singer-songwriter said on “CBS Sunday Morning” that she became angry at God.

“I was like, ‘Why on Earth do I keep getting pregnant if I can’t have a kid?’” she said in an interview over the weekend.“ ‘Do something. Either shut the door, or let me have a kid.’ For the first time, I feel like I actually told God how I felt. And I feel like we’re supposed to do that.”

Underwood went to the doctor a couple of days later and learned that her pregnancy was just fine, she said on the morning show.

“He heard me,” she said, explaining that God heard her prayers.

Underwood and her husband, professional hockey player Mike Fisher, are expecting their second child.

2017 was a rough year for Underwood. She fell while walking her dogs — breaking her wrist, chipping a tooth and injuring her face, which required 40 to 50 stitches, according to People magazine. She also lost two pregnancies — and then a third one this year, she said.

“We got pregnant early 2017, and it didn’t work out,” she added, her voice cracking. “It happens. And that was the thing in the beginning — it was like, ‘Okay, God, we know this just wasn’t your timing, and that is all right. We will bounce back and figure a way through it.’

“Got pregnant again in the spring, and it didn’t work out. Got pregnant again early 2018 — didn’t work out. So, at that point, it was just kind of like, ‘Okay, what’s the deal? What is all of this?’”

Underwood said that at the time, she was scared to allow herself to get angry.

“We’re so blessed,” she said on the morning show. “My son, Isaiah, is the sweetest thing, and he’s the best thing in the world and I’m like, ‘If we can never have any other kids, that’s okay because he’s amazing, and I have this amazing life.’ Really, what can I complain about? I can’t. I have an incredible husband, incredible friends, an incredible job, an incredible kid. Can I be mad? No.”

In August, Redbook published an interview with Underwood, in which she said she thought she and her husband may have missed their chance to have a big family.

“We always talk about adoption and about doing it when our child or children are a little older,” she told the magazine, adding that until that time, she and her husband plan to continue helping other children through charitable organizations.

“Our focus right now in our lives is helping as many kids as possible,” she added.

When asked about her successes, Underwood told “CBS Sunday Morning” that it has been a balance.

“You can’t win all the time,” she said. “You’ve got to have some downs to realize when you’re up.”

My ovaries failed me. That forced me to learn to let go of genetic connection.

My fantasy of giving birth to a mini-me died in a sterile doctor’s office

Here’s a glimpse inside the first-ever caucus of congresswomen who are mothers

Motherhood is a role that has increasingly been emphasized by members of both parties

The latest in the college admissions scandal: Actress Lori Loughlin and several others plead not guilty

Thirteen of the accused, including Felicity Huffman, agreed to plead guilty last week