Carli Lloyd is headed to her fourth Olympics after all.

The 38-year-old Lloyd had vowed after the 2019 World Cup that she would push to make the team for Tokyo before stepping away from the sport. But then the games were pushed back a year because of the coronavirus, and Lloyd needed surgery on her knee.

So making the 18-player roster was by no means a slam dunk for Lloyd, who scored three goals in the opening 16 minutes of the 2015 World Cup final in Canada.

Vlatko Andonovski announced his Olympic squad on Wednesday. Tobin Heath joins Lloyd in heading to her fourth Olympics.

At the 2008 Beijing Games, Lloyd scored in overtime for a 1-0 victory against Brazil in the final. Four years later, she scored both goals in the gold-medal match against Japan at Wembley Stadium, becoming the only player to score winning goals in consecutive Olympic finals.

Lloyd, who will turn 39 before the Tokyo Games, is the oldest national team Olympian, besting Christie Rampone, who was 37 when she played at the 2012 London Games.

Heath did not play in the national team’s recent Summer Series in Texas because of a knee injury. Julie Ertz is also recovering from an injury but should be ready when the United States opens the Olympics on July 21 against Sweden.

Becky Sauerbrunn, Kelley O’Hara, Alex Morgan and Megan Rapinoe will be playing in their third Olympics.

Abby Dahlkemper, Tierna Davidson, Emily Sonnett, Rose Lavelle and goalkeeper Adrianna Franch are first-time Olympians, as are sisters Samantha and Kristie Mewis.

Kristie Mewis is the only player on the roster who was not on the 2019 World Cup-winning team. She and Samantha are the first sisters to play for the senior national team in a world championship.

“We know there are some very talented players that won’t be in Japan, but these were the difficult decisions that we had to make,” Andonovski said in a statement. “We have a very experienced roster that has been through adversity at the highest levels, so it’s no surprise those players have distinguished themselves. They’ve embraced the challenges and have shown tremendous flexibility and determination over the past 15 months to get us to where we are today.”

Andonovski also named four alternates that will travel to Tokyo with the team: Goalkeeper Jane Campbell, defender Casey Krueger, midfielder Catarina Macario and forward Lynn Williams.

The United States is vying to become the first team to win an Olympics following a World Cup title. The Americans have won four gold medals since women’s soccer became an Olympic sport in 1996. But at the last Olympics in Brazil, the United States was knocked out by Sweden on penalties in the quarterfinals.

U.S. roster:

Goalkeepers: Adrianna Franch (Portland Thorns), Alyssa Naeher (Chicago Red Stars)

Defenders: Abby Dahlkemper (Manchester City), Tierna Davidson (Chicago Red Stars), Crystal Dunn (Portland Thorns), Kelley O’Hara (Washington Spirit), Becky Sauerbrunn (Portland Thorns), Emily Sonnett (Washington Spirit)

Midfielders: Julie Ertz (Chicago Red Stars), Lindsey Horan (Portland Thorns), Rose Lavelle (OL Reign), Kristie Mewis (Houston Dash), Samantha Mewis (North Carolina Courage)

Forwards: Tobin Heath (unattached), Carli Lloyd (Gotham), Alex Morgan (Orlando Pride), Christen Press (unattached), Megan Rapinoe (OL Reign)