Host, Egypt, inflicted a 2-1 victory on the former Olympic champions, which saw them tie on four points with Ghana.
Cameroon needed just a draw to scale through. But The Pharaohs were determined to secure the maximum points of the group, which they accomplished at the expense of the Cameroonians.
Ghana who thrashed Mali by 2-0 in the second group match which was played simultaneously scaled through with four points after finishing second. They edge Cameroon on goal-difference, and will face the winner of group b in the semifinal.
It will be recalled that Cameroon happens to be the second African country to win the Olympic gold in men football. They ruled the world at the Sydney 2000 Olympics when they won their first ever gold in men football.