The United States women's national soccer team, known for its Olympic dominance, was taken all the way to a penalty shootout by the Netherlands before managing to emerge victorious and set up a semifinal against its neighbor to the north, Canada.
The 4-2 spot-kick success followed a 2-2 draw after extra time at the Tokyo Games.
The world champion, who has taken Olympic gold four times, took the lead for 2-1 on 31 minutes through Lynn Williams, but the European champion hit back thanks to Vivianne Miedema's second goal of the game.
The U.S. had two goals disallowed for offside in the second half of extra time but eventually prevailed as goalkeeper Alyssa Naeher saved spot kicks from Miedema and Aniek Nouwen before star player Megan Rapinoe clinched the semifinal spot.
It was a revenge of sorts for the U.S., who had gone out on penalties against Sweden at the same stage at Rio 2016.
Canada knocked out Brazil 4-3 on penalties after a 0-0 draw in their quarterfinal, leaving the heralded Brazilians still without an Olympic title in the seven editions with women's football.
Australia fought back to defeat Britain 4-3 in extra time with Sam Kerr first taking the game to a further 30 minutes late in normal time and then netting one of Australia's two extra-time goals.
Ellen White scored a hat trick but it was all in vain for Britain, who also missed a penalty in extra time.
Australia will next meet Sweden in Monday's semis after the Scandinavians beat host Japan 3-1.
Rio champion Germany did not qualify for Tokyo.