Jessie Fleming scored a second-half penalty as Canada upset four-time Olympic women's football champions the United States 1-0 in Kashima on Monday to reach the final for the first time.
Fleming's 74th-minute spot-kick earned Canada a first win over their neighbours since 2001 and set up a clash with Sweden or Australia for the gold medal.
Defeat ended the Americans' 36-match unbeaten run against Canada. The world champions will face the losers of Monday's second semi-final for the consolation of a bronze medal.
The US and Canada combined for seven goals the last time they met at the Olympics, a memorable 4-3 semi-final win for the US after extra time at Old Trafford in 2012.
US goalkeeper Alyssa Naeher, the hero of their quarter-final win over the Dutch on penalties, required lengthy treatment here to her right knee after landing awkwardly while trying to collect a cross.
Naeher, who saved a spot-kick in normal time and two more in the shootout against the 2019 World Cup runners-up, briefly battled on but was eventually replaced by Adrianna Franch in the first half.
It wasn't until the introduction of Megan Rapinoe, Carli Lloyd and Christen Press on the hour that the US recorded a first shot on target, a curling strike from Lloyd tipped over by Stephanie Labbe.
Labbe stopped two as Canada edged Brazil on penalties in the previous round, and she produced another sharp save to keep out Julie Ertz's header at a corner.
The US had advanced to every Olympic final aside from at Rio 2016, where they lost to 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 were awarded a penalty following a VAR review.
Deanne Rose put Tierna Davidson under pressure and the Canadian went sprawling after a tangle of legs, with the referee pointing the spot after consulting the pitchside monitor.
Fleming tucked the resulting 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.