Underdogs Canada shocked four-time Olympic women's football champions the United States 1-0 on Monday to reach its first-ever final.
Jessie Fleming's nerveless 74th-minute spot-kick earned Canada a first win over its neighbors since 2001 and set up a clash with Sweden, who beat Australia 1-0 in the second semifinal.
The defeat ended the Americans' 36-match unbeaten run against Canada. The world champions will face Australia for the consolation of a bronze medal.
"It sucks, obviously, you never want to lose," said U.S. forward Megan Rapinoe.
"You never want to lose, you never want to lose in a world championship, you never want to lose to Canada, obviously, and you never want to lose playing the way we did."
"There's 100 things we'd all want to do better. I think that's the most frustrating thing for all of us," she added. "It's a tough one to swallow."
The U.S. and Canada combined for seven goals the last time they met at the Olympics, a memorable 4-3 semifinal win for the US after extra time at Old Trafford in 2012.
Canada ultimately finished with bronze nine years ago and ended third at Rio 2016 as well.
"There's some veterans on the team that still feel that hurt from 2012. I'm just over the moon for that group of players," said Canada coach Bev Priestman.
"Winners win and we're going into this final to absolutely go and get a gold medal."
US lose Naeher to injury
It wasn't until the introduction of Rapinoe, Carli Lloyd and Christen Press on the hour that the U.S. recorded a first shot on target, a curling strike from Lloyd tipped over by Stephanie Labbe.
By that point, the U.S. had lost goalkeeper Alyssa Naeher, the hero of their quarterfinal win over the Dutch on penalties, to injury.
Naeher, who saved a spot-kick in normal time and two more in the shootout against the 2019 World Cup runners-up, required lengthy treatment to her right knee after landing awkwardly in the first half.
She battled on for a few minutes but was eventually replaced by Adrianna Franch.
Labbe stopped two penalties herself in a shootout as Canada edged Brazil in the previous round, and she produced another sharp save to keep out Julie Ertz's header at a corner.
The U.S. had advanced to every Olympic final aside from Rio 2016, where they lost to eventual runners-up Sweden on penalties in the last eight.
Yet they had won just once in four matches over 90 minutes in Japan and fell behind when Canada was awarded a soft penalty following a VAR review.
Deanne Rose put Tierna Davidson under pressure chasing a loose ball and the Canadian went sprawling after a tangle of legs, with the referee pointing to the spot after consulting the pitchside monitor.
Fleming tucked the penalty beyond Franch, and there would be no comeback from the Americans – Lloyd's header clipping the bar in the final minutes as their Olympics came to a tame end.
Sweden will get the chance to make amends for its loss to Germany in the 2016 final after getting the better of Australia in Yokohama.
Fridolina Rolfo, who hit the crossbar in the first half, struck the decisive goal just after the break.
Ellie Carpenter was sent off deep into stoppage time for Australia after hauling down Lina Hurtig.