South Africa suffered a 3-0 defeat against Mexico to end their hopes of advancing beyond the football group stages at the Tokyo Olympics on Wednesday.
David Notoane's charges needed to win by two goals or more after their first two Group A matches against France and Japan ended in defeat as well.
Also, Japan needed to beat France in the other encounter for South Africa to qualify for a spot in the quarter-final.
While the hosts, Japan, did claim an easy 4-0 win against France, South Africa were outclassed by Mexico.
Despite starting the first half with much venom, South Africa pushed numbers forward but could find a way past their opponents.
However, that tactic worked in Mexico's favour after a quarter for the match proceeded.
Minutes before the 20th-minute mark, they snatched a lead.
Taking advantage of South Africa's dismantled defence, Alexis Vega scored after Uriel Antuna squared the ball into the 18th area.
After that, South Africa attempted to regather themselves and did so superbly, but the mounting pressure of the Mexican’s prevailed again.
South Africa's lack of concentration in the penalty area allowed Mexico to win the ball in two aerial duels, following a corner-kick.
The ball eventually landed at the feet of Luis Romo as he added a second goal.
Things went from bad to worse, as South Africa went down to 10-men as captain Tercious Malepe was sent off for a reckless challenge on Henry Martin.
Mexico immediately took advantage of the red card as Martin added a third goal from close range, giving goalkeeper Ronwen Williams no chance to get a glove to the ball.
However, Mexico's Carlos Rodriguez was shown a straight red card for a professional foul on Luther Singh, but the damage was already done as Mexico and Japan advance from Group A to the quarter-finals.