Andre-Pierre Gignac struck a second-half hat trick as France came from behind three times to defeat South Africa 4-3 in the Olympic men's football tournament at the Tokyo Games, with five goals coming during a frantic final 20 minutes in Sunday's Group A clash.
Ivory Coast's 0-0 draw with Brazil in Yokohama -- coming off the back of their opening 2-1 victory over Saudi Arabia -- takes them to second in Group D on four points after two matches, setting up a winner-takes-all showdown with Germany.
Elsewhere, Egypt are on one point after two games and must defeat Australia in their final group game to stand any chance of progress after falling 1-0 to Argentina during an engrossing day of Olympic football.
South Africa's loss -- despite leading 3-2 with four minutes to play -- leaves them bottom of Group A after two games, although they could still progress to the knockouts with victory in their final match. David Notoane's side, who missed a first-half penalty through Luther Singh, need to defeat Mexico in their final fixture, rely on Japan defeating France, and overturn a four-goal swing.
For South Africa, Sunday's showdown with a France team stunned 4-1 by Mexico in their opener represented a very different challenge than their opening meeting with hosts Japan. While they offered little going forward against the Blue Samurai, struggling to get their forwards into the game, their meeting with Les Bleus was a riotous encounter, with Amaglug-glug exploiting France's feeble defending repeatedly during a remarkable second half.
Gignac had already had a goal ruled out for offside before, late in the first half, Singh had an opportunity to open the scoring from the spot when Lucas Tousart had fouled Kobamelo Kodisang in the box, but his effort rattled the crossbar. The lively Kodisang made no mistake eight minutes after the break during an increasingly open encounter, however, when he capitalised on France's inability to deal with a long ball forward to open the scoring.
Gignac, a 2018 World Cup winner, finally netted his first of the encounter when he met Randal Kolo Muani's cross to beat Ronwen Williams four minutes later, only for South Africa to again take the lead in the 73rd minute when Evidence Makgopa volleyed home emphatically following fine work by Kodisang.
France's uncertainty at the back -- despite a plethora of players representing clubs in Europe's major leagues -- was matched by a genuine cutting edge up top, and Gignac equalised five minutes later when he was picked out by Clement Michelin. Teboho Mokoena thought he'd won the day for South Africa with a thumping effort in the 82nd-minute, only for Gignac to level from the spot -- and complete his hat trick -- after Williams had brought down substitute Arnaud Nordin.
A point apiece looked fair following a breathless encounter, but Montpellier's Teji Savanier had other ideas when -- with Notoane's troops flagging -- he was picked out by the outstanding Gignac and dispatched a thunderous effort beyond Williams in the third minute of stoppage time.
After seeing off Saudi Arabia in their opener Ivory Coast easily made the step up in class to deny a Brazil side who had downed Germany in some style in their opener.
The Selecao were more proactive, despite losing Douglas Luiz to a 14th-minute red card -- a decision that doubtless impeded their ability to carve apart an Ivorian side who had looked vulnerable at times in their opener. Nonetheless, they carried a threat of their own, with overage Max-Alain Gradel breaking through the lines before slicing into the side netting during the early exchanges.
Gradel -- an African champion with the Elephants in 2015 -- was the key protagonist in Douglas Luiz's dismissal, again beating the Brazil backline with his intelligent pace and movement before being brought down by the Aston Villa midfielder. VAR deemed he had been the last man, and the referee's initial decision to show a yellow was upgraded a straight red.
Brazil still bossed possession despite the dismissal -- with Bruno Guimaraes simply outstanding in the heart of the park -- as the Ivorian threats were largely limited to counters when the South Americans' moves broke down. Richarlison -- the hat trick hero against Germany -- looked likeliest to break the deadlock, and thought he deserved a penalty after being pushed in the box by Kouadio-Yves Dabila early in the second half, although his theatrical protestations served primarily to betray Brazilian frustration as they toiled.
A flurry of chances and a swathe of late substitutions weren't able to inspire Brazil to an opener, although Guilherme did force an outstanding save from Eliezer Ira Tape four minutes from time after Eboue Kouassi had been dismissed for the Elephants.
The Ivorians meet Germany in Rifu on Wednesday in their final group game, where a draw will be enough to at least match their quarterfinal showing at the 2008 Games.
Finally, to Sapporo, where Egypt can take much solace from their performance in a narrow defeat by Argentina, as they remain in the running to reach the final eight.
Seven minutes into the second half, Facundo Medina opened the scoring with a fine finish inside the penalty area after Egypt failed to deal with a cross from the left.
Argentina had been the better side during the first 45 -- notably hitting the woodwork via Adolfo Gaich's effort from range during the early moments of the match -- although Egypt did carry a threat, particularly through the inventive Ramadan Sobhi, star of their U23 Africa Cup of Nations triumph.
Sobhi had an opportunity to restore parity from a set piece during the dying embers of the encounter, only to send his free kick wide, and the North Africans evidently miss the presence of U23 AFCON top scorer Mostafa Mohamed, whose participation was vetoed by his club, Galatasaray.
"Argentina scored with their only dangerous chance of the game," Pharaohs coach Shawky Gharib told beIN Sports, "but this is football, and you've got to take your chances. We're still working, we can still qualify, and we haven't lost hope."
Spain's victory over Australia in Sunday's later kickoff means that Egypt must defeat the Olyroos in their final group game to progress, although goal difference could still deny them if there is a winner in the Argentina-La Rojita showdown.