BLOEMFONTEIN, South Africa(AP) -- Strutting into the stadium dancing and singing, Bafana Bafana turned its final game at the World Cup into a rollicking party for all of South Africa. All that was missing was enough goals to see them through to the next round.
For France, Tuesday's 2-1 loss completed a miserable meltdown.
With each team needing a big win to have any chance of moving on from Group A, both stuck to character. South Africa played eager and aggressive soccer. France imploded.
In the end, neither survived the group stage. But Bafana Bafana players left with their heads held high.
"The fighting spirit was there," said Katlego Mphela, who scored one of South Africa's goals. "It's a bit unfortunate, but we beat France in the World Cup."
Bongani Khumalo scored in the 20th minute when he outjumped France midfielder Abou Diaby to knock a cross from Siphiwe Tshabalala into the net with his shoulder. Mphela doubled the lead 17 minutes later, outmuscling defender Gael Clichy to reach a low cross from Tsepo Masilela and knock the ball across the line.
Substitute Florent Malouda scored for France in the 70th.
France leaves the tournament with a single point, from a 0-0 draw with Uruguay, and a single goal. Worse, it has become the shame of a proud nation.
On Tuesday, the 2006 runner-up was forced to play with 10 men after Yoann Gourcuff was ejected for elbowing Macbeth Sibaya in the 25th minute.
French soccer has been a mess ever since sports daily L'Equipe printed details of striker Nicolas Anelka's expletive-filled rant at coach Raymond Domenech during halftime of last Thursday's 2-0 loss to Mexico.
The French soccer federation sent Anelka home Saturday and the French players protested by refusing to practice the following day. Footage of the players refusing to come out of the team bus was beamed home to stunned fans.
Not even a dressing down by French sports minister Roselyne Bachelot on the eve of the match could inspire Les Bleus. Bachelot called an emergency meeting Monday to tell the players they had let the country down and had one last chance to redeem themselves.
"It's your kids, our children, for whom perhaps you will no longer be heroes," said Bachelot, who told reporters she left the players in tears. "It is the dreams of your partners, your friends, your fans that you have perhaps broken. You have tarnished the image of France."
In the stands, one fan flew a French flag with the word "shame" emblazoned on it.
Back in Paris, thousands of people watched the match broadcast on a screen across from the Eiffel Tower. It was a frustrating afternoon.
"It's funny, France is worthless," said 17-year-old fan Victor Malamoud.
Domenech said he was "sad for all the fans and everyone who supports the French team."
"It's the hard and harsh reality of our situation," he said. "So I have a genuine sense of sadness."
Domenech took captain Patrice Evra and five others out of Tuesday's lineup in the wake of the protest. After the game, Evra apologized to fans and promised a full explanation in the days to come.
"I will say everything I went through as captain," an emotional Evra said. "The whole of France needs to have an explanation for this disaster."
South Africa is the first host nation not to advance in 80 years of World Cup play.
While some fans were bound to be disappointed, Bafana Bafana entered the tournament ranked 31st among the 32 teams and acquitted itself well. An emotional tie with Mexico to open the tournament gave way to a deflating 3-0 loss to Uruguay, followed by Tuesday's victory over a team ranked ninth in the world.
"I'm so proud for the boys. The way our boys played from the very beginning," South Africa coach Carlos Alberto Parreira said. "They made this country proud. They proved that they made a good progression."
Mphela gave the France defense fits, with strong runs and dangerous drives from distance. He nearly scored his second goal in the 43rd with a right-footed drive from 25 yards that forced a diving save from Hugo Lloris. Then his right-footed shot hit the crossbar five minutes later.
South Africa's attacking style brought the crowd at Free State Stadium to life, and the home fans roared with each Bafana Bafana foray into the French half.
"I really thought we could pull through," Khumalo said.
Parreira told his players this was far from a failure.
"My main feeling is pride," Parreira said. "We knew this group was going to be a very difficult group."
"I can't say I'm sad, I'm happy."