Diana Matheson scored two minutes into stoppage time as Canada edged France, 1-0, on Thursday to win the bronze medal in women's Olympic soccer.
Three days after a dramatic overtime loss to the United States, Canada escaped with its highest finish in World Cup or Olympic play when Matheson converted a deflected shot inside the right post with just seconds remaining.
France hit the post and crossbar in the second half and controlled most of the bronze medal game at City of Coventry Stadium, but Matheson capitalized on one of just a few chances for Canada to secure the bronze at the death.
"The last few days have been a bit of a whirlwind. That was hard losing against the US. And we knew it was going to be a real test (Thursday)," Canada goalkeeper Erin McLeod said. "I'm so proud of everyone and how they fought for the result."
Canada had its previous best finish in World Cup or Olympic play in 2003, when it was fourth at the World Cup. Host of the 2015 World Cup, Canada proved at the Olympics it could be a factor in three years on home soil.
France finished fourth in the World Cup last year and settled for fourth place in its first Olympic appearance.
Canadian star Christine Sinclair, who scored a hat trick in a 4-3 loss against the United States, had just one chance in the first half but fired off target, and Elodie Thomis had the lone shot on goal in the first half for either squad for France.
France was much better in the second half, as Louisa Necib forced a save from McLeod in the 48th, Gaetane Thiney hit the left post in the 62nd, and Elodie Thomis hit the crossbar in the 63rd.
Canada survived the scares and when a shot deflected off France defender Sonia Bompastor into space on the right side of the area to Matheson, she picked out the bottom-right corner to score the match-winner for Canada.
"At the beginning of the tournament, we played well but I think we've raised the bar as we've gone through," McLeod said. "We've got better as we went on. I'm so proud of the way we've played."