Marrakech - South Africa's Olympic soccer qualifying run came to an end on Saturday night when Baby Bafana were outclassed 2-0 by a spirited Egyptian outfit at the CAF Under-23 Championships here in Morocco.
The South Africans needed to win against Egypt in their final Group B encounter to keep alive their dream of qualifying for next year's London Games.
After a goalless first half, the Egyptians broke the deadlock in the first play after the interval, with striker Mohamed El Eny slotting in a shot from the edge of the box in the 46th minute after Thami Sangweni lost the ball in midfield.
They doubled the margin after 63 minutes through a header from Mohsen Gamal who connected with a cross from Sabhi Mohamed on the left.
In a tightly contested group, the South Africans, with two points, finished in bottom spot.
Gabon stunned Ivory Coast 3-1 in a simultaneous tie in Tangiers to claim the crucial second spot for the last four stage, joinging the Ivorians who had already qualified from Group B.
The top three teams in the competition will qualify for the London Games, while the fourth-placed team will go into a playoff with an Asian opponent.
This was Baby Bafana's poorest effort of the tournament against a superbly organised Egyptian outfit.
The South Africans had played well, despite conceding late equalisers, in their two drawn encounters against Ivory Coast and Gabon earlier in the week.
The wheels seemed to come off when SA U-23 coach Shakes Mashaba took off trusted defender Thulani Hlatshwayo for striker Rodney Ramagalelo at half-time in a last-ditch effort to find the back of the net.
The plan backfired immediately as Egypt piled on the pressure, building on their momentum from the opening period.
They consistently put South Africa on the back foot, with chances falling to Gamal, substitute Saad El Din and Mohamed El Baset, and shot stopper Brilliant Khuzwayo did well to keep the scoreline respectable.
Baby Bafana managed to fashion in efforts from Sameegh Doutie, Thandani Ntshumayelo and Christopher Flandorp but all their efforts were pelted away by Ahmed El Shenawi in the Egyptian goal.
The South Africans were poor in the first 45 minutes as they gave away possession and were put under pressure by their more fluent opponents.
Outside of Sangweni's attempted long-range volley outside the box, which sailed narrowly wide of goal in the opening seconds of the match, they struggled to penetrate the Egyptian defence.
There were gutsy forays from Doutie and Mandla Masango, but they came to waste in the final third of the pitch.
In the 34th minute, Khuzwayo did well to halt a free kick at an angle from Mohamed Ghaly.
Egypt face hosts Morocco in Marrakech and Gabon are up against Senegal in Tangiers in next week's semi-finals.
The SA women's team, Banyana Banyana, have already booked their place at the Olympics, securing one of two spots available to African nations.