Brazil brought Zambia's Olympic run to an end with a scrappy 1-0 win in Saitama. However, thanks to the Netherlands' 8-2 thrashing of China in the other Group F fixture, Brazil had to settle for second place on goal difference.
Zambia came into the match off the back of a 4-4 draw with China which had kept their faint hopes of reaching the quarterfinals alive. However, as a result of their 10-3 loss to the Netherlands in their opening fixture, it was always going to be near impossible to claw back on goal difference.
Meanwhile, Brazil were battling for top spot after Dominique Janssen's equaliser held them to a 3-3 draw against the Netherlands in their previous match.
Neither team held back in the early exchanges, with opportunities at both ends. Shanghai Shengli's Barbra Banda, already one of the headline acts at the Olympics with back-to-back hat-tricks against the Netherlands and China, got in behind the defence and forced a fine save from namesake Barbara in the fourth minute, but the offside flag eventually went up in any case.
In the ninth minute, Beatriz was found, unmarked, by a ball in from Brazil's left, but Zambia goalkeeper Hazel Nali reacted swiftly to block her shot. A minute later, the Hapoel Be'er Sheva goalkeeper was put to the test again -- this time with dire consequences. Zambia's defence was unlocked by a ball in behind for Ludmila, and although Nali managed to smother the Atletico Madrid winger, she took a blow in the process and was forced to go off, replaced by Ngambo Musole.
To add insult to injury, a VAR review showed that Lushomo Mweemba had made slight contact with Ludmila, possibly affecting her balance before she clattered into Nali. Referee Yoshimi Yamashita did not afford the last defender any benefit of the doubt, reaching for the red card. Zambia head coach Bruce Mwape substituted forward Avell Chitundu for defender Vast Phiri, switching to a 4-4-1 formation.
The ensuing stoppage only ended in the 19th minute, with Andressa scoring the resulting free kick from the edge of the box. Musole got a hand to the strike and would have felt disappointed not to tip it wide.
There was another stoppage minutes later as Beatriz clashed heads with Racheal Kundananji. The former was unable to continue, going off for Giovana in the 28th minute.
Zambia remained resolute in defence, while Barbra Banda held the ball up well at the other end, but their numerical disadvantage showed as they struggled to keep possession.
Brazil, however, created precious little until 14 minutes of stoppage time were added on at the end of the first half and the first signs of wear and tear began to show in the Copper Queens defence.
In the seventh minute of added time, another pinpoint Andressa free-kick -- this one from near the left touchline -- found Rafaelle unmarked at the near post. Her header whistled over the crossbar by the finest of margins with Musole powerless to intervene.
The substitute goalkeeper did, however, demonstrate her credentials by tipping a superbly-struck Marta corner behind, preventing it from creeping in at the far post.
Within two minutes of the half-time whistle, a cross from Brazil's right was only partially cleared and Andressa latched onto the ball, smashing it against the crossbar.
Brazil head coach Pia Sundhage opted to preserve her main assets at the break, bringing Julia and Duda on for veterans Marta and Formiga.
Shortly after the hour mark, the game claimed another casualty as Poliana was stretchered off, replaced by Bruna Benites. Ludmila, meanwhile, made way for Geyse in a tactical substitution.
In the 65th minute, Grace Chanda's sweetly-struck long-range free kick only narrowly missed the top corner. There were few opportunities in the closing stages at either end, although there was a heart-in-mouth moment in the 78th minute for fans of Banda, who for the second successive match was subject to an unsavoury challenge late in the game.
Thankfully, Banda was able to see out the match, while Angelina received a yellow card for her studs-up tackle.
Zambia finished the group in third place as a result of their superior goal difference to China, but as the only third-placed team with only one point to their name (Japan and Australia each amassed four), the Copper Queens were sent home, albeit with their heads held high.
For Brazil, a clash with Canada in Rifu awaits on 30 July, with the winner set to face either the Netherlands or United States in the semifinals.