South Africa ended their Group A campaign on a high note with a battling win over France, as the hosts were eliminated from the World Cup on goal difference.
Carlos Alberto Parreira's side become the first host nation to fail to reach the second round of the tournament but they can hold their heads high after a performance full of spirit and endeavour.
Goals from Bongani Khumalo and Katlego Mphela gave Bafana Bafana hope of qualifying at the interval, but they ultimately ran out of steam as they chased the goals they needed to overhaul second-placed Mexico.
France, who had Yohann Gourcuff harshly dismissed before the break, did manage to pull a goal back through Florent Malouda, but Raymond Domenech's men never looked like rescuing what has been a shambolic World Cup.
Rumours of a rift in their squad developed into a fully-fledged row that saw Les Bleus striker Nicolas Anelkas sent home in disgrace on Saturday for arguing with Domenech - and the fall-out from that incident saw captain Patrice Evra dropped for this game.
There had also been reports that some French players would refuse to play in this match, and although a boycott did not materialise, Domenech's reign as manager ended with a defeat that left his side bottom of the group.
South Africa deservedly went ahead after 20 minutes when France goalkeeper Hugo Lloris completely missed Siphiwe Tshabalala's corner and Khumalo launched himself at the ball, turning it in off his shoulder.
France's farcical tournament took a further turn for the worse six minutes later when Gourcuff was given his marching orders for an aerial challenge on MacBeth Sibaya. Gourcuff did lead with his arm as he leapt to meet a corner but any contact looked accidental.
And the hosts added to France's misery when Les Bleus failed to clear Tshabalala's cross from the left and Tsepo Masilela turned the ball back across goal for Mphela to bundle it home at the back post despite the best efforts of Gael Clichy.
France did threaten sporadically but their best effort came almost inadvertently when Franck Ribery's hoisted free-kick sailed over a crowd of players and looked like it would bounce in until Moeneeb Josephs tipped over with a superb reaction save.
News that Uruguay had taken the lead in Rustenburg whipped the crowd at the Free State Stadium in Bloemfontein into a further frenzy and they almost had another goal to celebrate before half-time when Mphela had a rasping shot tipped round the post by Lloris.
But Bafana Bafana still needed to score two more goals themselves - or hope Mexico conceded the same number - to reach the last 16, and it was a quest that was ultimately beyond them.
They almost got a third goal at the start of the second half when Tshabalala slid Mphela clear, but he clipped the outside of the post with his first-time shot.
Mphela also saw a fierce shot pushed away by Lloris but South Africa were clearly tiring quickly and becoming increasingly vulnerable at the back.
France were able to exploit that when Ribery beat Tsepo Masilela to Bacary Sagna's through ball and squared for Florent Malouda to tap home.
South Africa continued to come forward but it was without their previous vigour and they did not create another clear-cut opening until Tshabalala was denied by Lloris in injury time.
Their elimination will bring disappointment to their fanatical supporters but at least they have had moments to savour in the tournament, unlike France, who depart after a hugely disappointing showing on and off the pitch.
Attempts on target
Attempts off target
Projected table based on current scores
|Group A teams||P||W||D||L||F||A||GD||PTS|
|Group B teams||P||W||D||L||F||A||GD||PTS|
|Group C teams||P||W||D||L||F||A||GD||PTS|
|Group D teams||P||W||D||L||F||A||GD||PTS|
|Group E teams||P||W||D||L||F||A||GD||PTS|
|Group F teams||P||W||D||L||F||A||GD||PTS|
|Group G teams||P||W||D||L||F||A||GD||PTS|