Caroline Weir's late deflected strike secured Great Britain Women top spot in Group E after a 1-1 draw with Canada at the Tokyo Olympics.
Team GB had already booked their place in the last eight thanks to previous wins over Chile and Japan and needed just a point to finish top of the group, but Adriana Leon's 55th-minute strike looked to have condemned them to the runners-up spot.
However, Weir's deflected strike five minutes from time secured the point they needed to go into the quarter-finals as group winners, where they will face Australia on Friday (kick off 10am).
Despite the late disappointment, the point also secured Canada a place in the quarter-finals and they will face Brazil, also on Friday morning (kick off 9am).
Women's Olympic Football Quarter-finals...
- Canada vs Brazil (Friday, 9am)
- Great Britain vs Australia (Friday, 10am)
- Sweden vs Japan (Friday, 11am)
- Netherlands vs USA (Friday, 12pm)
- Football at Tokyo 2020: Fixtures, venues, Team GB schedule
- Which PL stars are heading to Olympics?
- Meet the Team GB Women going for gold in Tokyo
How Team GB secured top spot in Group E...
Canada, who needed a point to qualify for the last eight and a win to have any chance of toppoing the group, started brightly and Lucy Bronze had to be alert to clear Deanne Rose's low cross into the penalty area.
However, Team GB grew into the game and began to take a grip of proceedings. Nikita Parris slid an inch-perfect pass through for Georgia Stanway, but the Man City forward, who tried to cut back onto her right foot, could not get a shot away as Jayde Riviere got back to make a crucial intervention.
Canada: Labbe, Buchanan, Gilles, Lawrence, Leon, Quinn, Riviere, Schmidt, Rose, Viens, Beckie.
Subs used: Fleming, Huitema, Prince, Grosso, Carle.
Great Britain: Roebuck, Bronze, Bright, Williamson, Stokes, Ingle, Weir, Daly, Scott, Stanway, Parris.
Subs used: Little, White, Kirby.
It wasn't long before Great Britain got in behind the Canadian defence again as Jill Scott picked out the run of Rachel Daly. This time, Daly got a shot away, but Ashley Lawrence got back to make a crucial block.
Just before the break Demi Stokes' cross picked out Parris, but she failed to make a clean contact with her strike. The rebound almost fell kindly for Caroline Weir, but she could not get it under her control as the two sides went in goalless at the break.
- 2021/22 WSL fixtures: Champions Chelsea begin at Arsenal
- Women's Super League 2021/22 - full schedule
Canada went close to a breakthrough straight after the interval as Ellie Roebuck's poor pass picked out Leon on the edge of the penalty area. The Canada striker had an empty net to aim at, but she could not get the ball past Millie Bright, who made a crucial block.
Leon and Canada were not to be denied moments later, though. Lawrence's low cross evaded everyone in the penalty area, picking out Leon at the far post, and she made no mistake with her finish to give her side the lead.
Team GB looked for a response and it almost came from Weir in the 68th minute. The Man City forward's shot from an extremely tight angle beat Stephanie Labbe but the ball clipped the underside of the crossbar and the post before bouncing out to safety.
Riise's side were not be denied, though, and Weir did finally get her goal as her long-range effort struck substitute Nichelle Prince and wrong-footed Labbe to find the back of the net and secure the point Great Britain needed for top spot.
What the managers said…
Canada boss Beverly Priestman said: "On our day I definitely think we put out better performances the better the opposition. Our job is getting ready for the next game, one game at a time, but we absolutely believe we can get on that podium."
Great Britain boss Hege Riise: "I believe strongly in this team, a great team always finds a way to come back and we did. Closer to the finish we started to get some momentum, luckily we were good enough to get the goal.
"It was an important goal (from Weir), we top the group, we're staying here and have a little bit more rest so we are happy.
"There are always things you want to improve on, we have played three games against three good opponents and have performed better and better. We haven't been together that long so we'll improve every game.
"Overall, we looked strong and confident and that will be important going forward."
Who will Great Britain and Canada face in the quarter-finals?
Great Britain will face Australia on Friday morning; kick-off 10am.
Meanwhile, Canada's second-place finish sees them face Brazil, also on Friday morning; kick-off 9am.