The U.S. women's national soccer team advanced to the semifinals of the Tokyo Olympics Friday after beating European champions the Netherlands on penalty kicks in a dramatic and grueling quarterfinal.
A tense and topsy-turvy match went to a 30-minute extra time period tied 2-2 after U.S. goalie Alyssa Naeher saved a late Dutch penalty that would've sent the Americans home.
And she was the hero again, saving twice in the shootout and setting up Megan Rapinoe to send the U.S. into the next round.
They will now meet Canada, which beat Brazil 4-3 on penalties after a 0-0 tie in their quarterfinal. Sweden, which beat hosts Japan 3-1, will take on Australia in the other semifinal.
Download the NBC News app for breaking news and politics
After a stunning 3-0 loss in their opening match against Sweden, the United States rebounded with a convincing 6-1 win versus New Zealand, before securing qualification to the knockout stage with a dull 0-0 tie against Australia.
That mixed performance meant they finished in second place in Group G and were forced to face the Netherlands, fourth in the world rankings — the U.S. are first.
Team USA dominated the early stages of the game, a hotly anticipated rematch against the team they defeated in the 2019 World Cup final.
But they went a goal down after 19 minutes when star Dutch forward Vivianne Miedema scored from inside the box. Receiving the ball in traffic, she quickly found her bearings and fired it past Naeher for her ninth goal of the tournament.
The U.S. leveled the game on 28 minutes with a Sam Mewis header, before taking the lead with a thunderbolt from Lynn Williams.
The second half opened brightly, with Dutch goalkeeper Sari van Veenendaal saving at the feet of Carli Lloyd who was clean through on goal.
Then on 55 minutes, Miedema had scored again to tie the game, lashing a right-footed shot inside Naeher's left post.
With less than 10 minutes of the 90 remaining, the Netherlands were awarded a penalty when Kelley O'Hara fouled Lineth Beerensteyn in the penalty box.
But Naeher dived low to her left to save from Lieke Martens, to keep the game tied.
In the first half of extra time, the Dutch piled on the pressure and had the ball in the back of the net when Beerensteyn headed it in after a scramble in the penalty area. But the goal was ruled out for offside. She later shot just over the crossbar.
Team USA then had two goals ruled out for offside at the start of the second. Both Christen Press and Alex Morgan hit the back of the net, only to see them disallowed. With three minutes remaining Megan Rapinoe blazed the ball over the bar.
With nothing to separate the teams, the game then went to a penalty shootout in which the Americans made no mistake to seal their place in the semis.
Naeher saved Miedema's opening penalty and another from Aniek Nouwen. Rose Lavelle, Morgan and Press scored for the U.S. before Rapinoe — so often the talisman — stepped up and fired confidently into the roof of the net.
This article was originally published on NBCNews.com.