Teji Savanier scored the match-winning goal in stoppage time and Andre-Pierre Gignac added three more to give France a 4-3 victory over South Africa on Sunday in the group stage of the men's Olympic football tournament.
After a scoreless first half, Kobamelo Kodisang's goal put South Africa in front in the 53rd minute. Gignac tied it with his first goal about four minutes later.
Evidence Makgopa put South Africa back in front but Gignac again countered in the 78th. Teboho Mokoena then scored for South Africa in the 81st minute before Gignac converted from the penalty spot in the 86th to set the stage for Savanier's late blast.
South Africa forward Luther Singh's penalty attempt in the 40th minute hit the crossbar and skirted over the goal.
South Africa lost to host Japan 1-0 to open Group A on Thursday. France, which won the gold medal at the 1984 Los Angeles Olympics, was routed by Mexico 4-1 in its opener. Gignac also scored for Les Bleus in that game.