Updated

The U.S. women's soccer team’s rocky Tokyo Olympics ended with a bronze medal on Thursday.

The U.S. held off a charging Australia, 4-3, to finish in third place in the women’s soccer competition. The U.S. received two goals each from Megan Rapinoe and Carli Lloyd.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Alex Morgan congratulated her teammates after the victory.

"Coming home with that fresh Bronze and couldn't be more proud of this team! Battling until the end it's been 40 days on the road and ending on a high makes it all worth it!!" she tweeted.

The U.S. women’s team also thanked Japan for a successful trip.

US WOMEN'S SOCCER TEAM WRAPS UP TOKYO OLYMPICS WITH BRONZE MEDAL

"Thank you, Japan! In a year unlike any other, the opportunity to compete safely is one we'll cherish. Grateful for your commitment and hospitality!"

Lloyd became the first U.S. women’s soccer player to score in four different Olympics. It was the 10th Olympic goal for Lloyd, breaking a record previously held by Abby Wambach. Lloyd scored right before the end of the first half and then again right after the start of the second half.

CLICK HERE TO GET THE FOX NEWS APP

It’s the first time the U.S. team has picked up a bronze medal and the first time the team has medaled since the 2012 Olympics.