U.S. soccer legend Carli Lloyd opened up about her struggles with infertility and using in vitro fertilization (IVF) to get pregnant as she announced she will be having her first child.

Lloyd detailed her pregnancy journey in an article for Women’s Health. She opened up about the disappointment she felt for months trying to get pregnant while also feeling as though she was in a "race against the clock—my 40-year-old biological clock."

Lloyd wondered why her body was "failing me" after treating her body like a temple for years as she helped the U.S. women’s soccer team to World Cup titles and Olympic gold medals. She started her IVF journey in April 2023 but suffered a roadblock when she was told three embryos made it after she had 20 eggs retrieved.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Carli Lloyd smiles

Carli Lloyd attends PaleyLive: A Conversation With FOX Sports: FIFA Women's World Cup 2023 at Paley Center For Media on June 12, 2023 in New York City. (Joy Malone/Getty Images)

"So it was a waiting game that we literally had no control over," she added. "And it’s hard. I felt all the emotions during my career—stress, worry, fear, anxiety—but I’d never felt all the emotions that IVF brought on. I felt completely out of control. It’s an indescribable roller coaster unless you go through it."

Lloyd said she hoped to be able to get pregnant and be able to work the Women’s World Cup "and everything would be absolutely perfect." She conveyed it was far from that.

She said she and her husband, Brian Hollins, waited until October 2023 to try the embryo transfer. She said she did all the things she needed to try and help the transfer go smoothly, but waiting was "torture" for her.

Lloyd said she received a call from her doctor again – more bad news.

"I wasn’t pregnant. I felt sick to my stomach," Lloyd said. "He was heartbroken for us. He said that even when you take all these steps, there’s only a 60% chance of a successful transfer with genetically normal embryos, and sometimes it just doesn’t work out. 

"He suggested we go ahead with another retrieval since now was the time to get as many embryos as we could for future children. That afternoon, I had to put a smile on my face, wipe away tears, and shoot some social media content. Life went on."

Lloyd said she began to second guess herself about everything she consumed. She said her emotional state was different and spent a lot of nights crying.

Carli Lloyd in New Zealand

Former U.S. soccer player Carli Lloyd poses with the Women's World Cup trophy during a trophy promotion event in Wellington, New Zealand, on July 14, 2023. (MARTY MELVILLE/AFP via Getty Images)

LIONEL MESSI'S BODYGUARD SPRINGS INTO ACTION TO REMOVE OVERZEALOUS FANS WHO TRIED TO INTERACT WITH SOCCER STAR

It did not stop her from trying IVF for a third time. She said she changed her approach this time around, spending more time with nature and meditating through journaling rather than worrying about things she ultimately could not control. She said she and her husband took a December trip to the Bahamas and learned that four embryos made it to the six-day threshold and two were genetically normal.

The next transfer process began in January with another trip to Arizona planned. She was able to get blood work done while she was on the trip. The day after, the results came in.

Lloyd was finally pregnant.

However, the soccer great said she was not exactly out of the woods just yet. She had a few more rounds of testing to be done, and her doctor expressed one concern about a potential miscarriage. Lloyd said she kept doing what she was doing to put her mind at ease – journal, nature and putting her faith in God.

Lloyd said she would go back each week to get an update on the baby and each time, there was a heartbeat. After 10 weeks, she graduated from the fertility clinic to an ob-gyn.

On Tuesday, she shared her story with the world.

"It is still hard to believe I am pregnant. It truly is a miracle, and we are so excited to be parents!" she said.

Carli Lloyd trains

Carli Lloyd looks on during a Legends Tournament ahead of The Best FIFA Football Awards 2022 at Centre Sportif Emilie Antoine on Feb. 27, 2023 in Paris. (Joe Maher - FIFA/FIFA via Getty Images)

Lloyd added that she wanted to share her story using IVF to show "other women that it’s OK to struggle." 

CLICK HERE TO GET THE FOX NEWS APP

"It’s OK to feel broken and to feel hopeless, but to never give up and to keep going."

Follow Fox News Digital’s sports coverage on X and subscribe to the Fox News Sports Huddle newsletter.