Egypt recorded their first loss in the Olympic Games in Group C after going down 1-0 against Argentina on Sunday.
The lone goal for the South Americans came in the second half courtesy of Facundo Medina.
Having drawn with Spain in their opening game, the Africans came into the match hoping to get a positive result over their opponent.
The South Americans had fallen to Australia in their opening game and needed to bounce back to stand a chance of going all the way to get a medal.
Argentina started the match on a high and almost took a fifth-minute lead when Adolfo Gaich received the ball in a good area and controlled it well, but his shot was deflected out by the woodwork.
In the 22nd minute, Egypt could have grabbed a goal when Karim El Eraki found space inside the box, but with the goalkeeper stranded, he failed to direct the ball on target.
Argentina dominated possession in the first half, but they had no goal to show for it. However, things changed in the second half.
A short corner was taken in the 52nd minute and the goalkeeper parried the ball. It went as far as Medina and he gleefully rifled the ball low inside of the left post to hand his team an advantage.
It happened to be the winning goal for Argentina who are now on three points from two matches.
In another match played, 10-man Brazil retained their position on top of Group D after playing out a goalless draw with Ivory Coast, who also played the last 10 minutes or so with 10 men.
Both teams started the game well and the first major decision had to be made in the 13th minute when Douglas Luiz, who was the last man, fouled Youssouf Dao, who had beaten him to the ball, and after consulting the VAR, the defender was sent off.
The Elephants had a good chance to score after a half-an-hour when Amad Diallo received a good pass inside the 18-yard area. But his weak effort was easily saved.
Holiday calls on USA to ‘break the barrier’ after France upset
Richarlison thought he had won a penalty in the 50th minute for the Samba Boys, but the referee waved play on amid protests from the South Americans.
Eboue Kouassi was sent off in the 80th minute after a second bookable offence, ensuring the teams each finished the game with a man less.
Both teams are now on four points from two matches.