Canada shook off a six-point deduction following a spying scandal to reach the quarter-finals of the women’s Olympic football tournament with a 1-0 win over Colombia in their final group game on Wednesday.

Defender Vanessa Gilles, who scored a dramatic late winner against France in Canada’s previous outing, headed in the only goal of the match in Nice from a Jessie Fleming free-kick just after the hour mark.

It meant the reigning Olympic champions finished with three wins out of three in Group A, but the points deduction leaves them with just three points in the first round.

That was still enough for them to qualify for the quarter-finals in second place, behind group winners France and ahead of Colombia on goal difference.

The Canadians therefore advance to a last-eight tie in Marseille on Saturday against 2016 gold medallists Germany.

The final whistle was greeted with scenes of joy by the Canada players, who were handed bad news in the hours leading up to the game when the Court of Arbitration for Sport dismissed their appeal against the points deduction.

Canada were docked six points and fined 200,000 Swiss francs ($226,000) by FIFA as a punishment after a staff member used a drone to spy on a New Zealand training session ahead of their opening match at the tournament, which Canada won 2-1.

Coach Bev Priestman was given a one-year ban by FIFA for her responsibility in the scandal, meaning assistant coach Andy Spence has taken interim charge.

France topped the group after bouncing back from a 2-1 loss to Canada to beat New Zealand by the same margin in Lyon.

Prolific striker Marie-Antoinette Katoto scored both France’s goals, her fourth and fifth strikes of the competition, either side of a Kate Taylor effort for New Zealand.

Marta sent off, Australia out

Earlier, the United States claimed a 2-1 win over Australia in Marseille to finish top of Group B with a perfect record.

Goals in each half by Trinity Rodman and Korbin Albert made the difference for the USA, with Alanna Kennedy pulling one back for Australia, who are eliminated.

The United States, coached by English former Chelsea boss Emma Hayes, will now take on Japan, runners-up in Group C, in Paris on Saturday in a repeat of the 2012 London Olympic final won by the USA.

Germany secured second place in Group B with a 4-1 win over Zambia in Saint-Etienne in which Lea Schueller scored twice and both Klara Buehl and Elisa Senss were also on target, with Barbra Banda grabbing a consolation.

Brazil are through to a quarter-final against France as a best third-placed side, despite going down 2-0 to World Cup holders Spain in Bordeaux in a game that will be best remembered for Marta’s sending-off.

The 38-year-old Brazilian legend exited the pitch in tears after being shown a straight red card in first-half stoppage time for a dangerous high tackle on Spain captain Olga Carmona.

She was inconsolable as she walked off the pitch in what could turn out to be her final act at an Olympic Games.

The multiple winner of the FIFA women’s world player of the year award is appearing at her sixth Olympics and featured in the teams that won silver in 2004 and 2008.

Her hopes of appearing again in this tournament depend on whether Brazil make it through their quarter-final tie.

Athenea del Castillo tapped in to put already-qualified Spain ahead against Brazil, and Alexia Putellas curled in their second in the 17th minute of injury time.

Spain will now play Colombia in Lyon on Saturday.

Japan finished second in the group behind Spain after beating Nigeria 3-1 in Nantes, with Maika Hamano, Mina Tanaka and Hikaru Kitagawa scoring their goals, the latter from a fine free-kick. Jennifer Echegini replied for Nigeria.