KASHIMA, Japan— Jessie Fleming scored on a penalty kick in the 74th minute and Canada earned a 1-0 semifinal victory over the United States in the Olympic women's soccer competition on Monday.
Canada goes on to face the winner of the late semifinal in Yokohama between Sweden and Australia. The gold medal match is set for Friday at the Olympic Stadium in Tokyo.
The United States has been knocked out of gold medal contention, but still has a chance to win a bronze.
Canada had not won against the United States since 2001.
The Americans, who were vying for their fifth gold medal, had earned a spot in the semifinals on a 4-2 penalty shootout after a 2-2 draw with the Netherlands on Friday.
But the U.S. had an uncharacteristically uneven tournament, starting with a 3-0 loss to Sweden that snapped a 44-game unbeaten streak, and a scoreless draw with Australia in the group stage.
After a scoreless first half, Canada went up 1-0 in the 74th minute on Fleming's penalty against backup U.S. goalkeeper Adrianna Franch.
Starting goalkeeper Alyssa Naeher came down awkwardly trying to go up for the ball in front of her goal in the 20th minute.
Naeher was attended to by trainers for some five minutes while the backup Franch warmed up. While she tried to stay in the game, Naeher couldn't continue and Franch was subbed into the game in the 30th minute.
Naeher was key to the victory over the Dutch in the quarterfinals, with a penalty save during regulation and two more in the deciding shootout.
Overall the United States is 51-4-7 against Canada. The most recent meeting was a 1-0 U.S. victory at the SheBelieves Cup in February.
The previous Olympic meeting was back in 2012, a controversial semifinal match that went to overtime. Canadian star Christine Sinclair scored three goals, but the United States won it 4-3 on Alex Morgan's header in the 123rd minute.
The controversy stemmed from questionable calls, including a rare six-second violation against Canadian goalkeeper Erin McLeod late in regulation — touching off a sequence that resulted in the tying goal.
Canada advanced 4-3 on a penalty shootout after a scoreless draw with Brazil in this tournament. The Canadians have won the bronze medal in the past two Olympics.
The United States already advanced further in Japan than in the Rio Games, when the team was eliminated in the quarterfinals by Sweden.
Coach Vlatko Andonovski has been creative with his lineups throughout the tournament. On Monday, Lynn Williams, originally an alternate, started her second straight game. Carli Lloyd, Megan Rapinoe and Samantha Mewis were on the bench to start.
Rapinoe had the game-clinching penalty kick against the Netherlands. She came in early in the second half, along with Lloyd and Christen Press.
Lloyd fired off a shot in the 65th minute that forced Canadian goalkeeper Stephanie Labbe to leap to push it over the crossbar. A short time later, Labbe stopped Julie Ertz's head off a corner from Rapinoe as the United States increased the pressure.
Feming's successful penalty chilled the Americans' momentum.
Canada started Sinclair, the all-time leading international goal scorer among men or women with 187 goals.