Vanessa Gilles scored in the 62nd minute to give Canada a 1-0 win over Colombia and send the team into the quarterfinals of the Paris Olympics on Wednesday despite losing six points in the tournament because of a drone spying scandal.
Canada will face Germany in the quarter-finals on Saturday in Marseille.
Earlier in the day, the defending Olympic champions lost their bid to overturn a FIFA-ordered point deduction for filming an opponent's practice in France.
Canada, which won its first two games but earned no points from those victories, entered Wednesday's match in Nice needing a win to have a chance to advance.
“At the beginning of the game we wanted to win, no matter what the decision was,” said Canada captain Jessie Fleming. “It didn't change our game plan or what we wanted to do.”
Canada had asked the Court of Arbitration for Sport to overturn a six-point penalty imposed by the sport's world governing body for spying on New Zealand's practices before its opening match last week.
The six-point penalty for a violation of FIFA rules during a tournament is unprecedented in modern football.
“The chances were against us but we came through, we stuck together despite everything and we've seen the results of that,” Gilles said after the win.
In addition to the points penalty, Canadian coach Bev Priestman, an assistant coach and a performance analyst received one-year suspensions and were sent home from the Olympics.
Priestman was the coach when Canada won the gold medal in Tokyo three years ago.
Information from The Associated Press contributed to this report.