Vanessa Gilles scored in the 62nd minute to give Canada a 1-0 victory 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 a quarterfinals Saturday in Marseille.
Earlier in the day, the defending Olympic champions lost their bid to overturn the FIFA-ordered points deduction for filming an opponent's practice in France.
Canada, which won its first two matches but effectively earned no points from those victories, went into Wednesday's match in Nice in need of a win to stand a chance of advancing.
"Going into the match we wanted to win regardless of what that ruling was," Canada captain Jessie Fleming said. "It did not 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 practices ahead of their opening game last week.
The six-point penalty for an in-tournament violation of FIFA rules is unprecedented in modern soccer.
"Chances were stacked against us, but we pulled through, we stayed together through it all and we have seen results of that," Gilles said after the victory.
As well as the points penalty, Canada coach Bev Priestman, an assistant coach and a performance analyst were all given one-year bans and 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.