Denmark came from behind to defeat Cameroon in a pulsating match that ensured the African team became the first to be knocked out of the 2010 World Cup.
It was a game in which both teams squandered numerous chances - but the Indomitable Lions were undoubtedly the most profligate, particularly after they fell behind and chased the goal that they so desperately needed.
Danish keeper Thomas Sorensen superbly denied Achille Emana, while substitute Vincent Aboubakar had a goal-bound effort blocked by Christian Poulsen in the closing stages as the atmosphere reached fever pitch at Loftus Versfeld.
Denmark have qualified from the group stage at all three previous World Cup appearances - and Morten Olsen's team will face Japan in their final game knowing a victory will take them into the next round.
And the result also ensured that the Netherlands - 1-0 winners over Japan earlier in the day - will qualify from Group E.
It did not look as though the experienced - if aging - Scandinavians would leave with three points after Cameroon tore into them in the opening minutes.
The African side had taken an early lead through Samuel Eto'o, who later hit the post, after a horrific error from Christian Poulsen.
But Nicklas Bendtner equalised from close range before veteran Dennis Rommedahl ghosted beyond substitute Jean Makoun after the break to leave Cameroon pointless after two games.
Cameroon were simply awful as they lost their opening match against Japan but in the minutes after kick-off on Saturday they looked strong, enthusiastic and focused.
There had been much talk of a rebellion against the tactics of coach Paul Le Guen, particularly after Eto'o played on the right and Alex Song was left out altogether against the Japanese.
But Song was restored to the Indomitable Lions midfield and had a fine game in a deep role, while Eto'o played in a more central position and took just 10 minutes to put his team in front.
Denmark, who lost to the Netherlands in their opening match, started nervously and gifted Eto'o his goal when Poulsen's awful square pass close to the edge of his own penalty area was intercepted by Pierre Webo.
He slipped the ball to an unmarked Eto'o and the Cameroon skipper had time to slot the ball beyond Thomas Sorensen from 14 yards.
Eto'o had already shot wide, while Emana went close with a rasping low strike shortly after the opener as Le Guen's team threatened to take a firm grip on the contest.
Denmark, with Jesper Gronkjaer, Jon Dahl Tomasson and Rommedahl playing behind Bendtner, simply could not keep hold of the ball during the opening 15 minutes, but they slowly edged their way back into the contest.
Rommedahl and Gronkjaer had both failed to hit the target with shots from wide positions but it would have been difficult for Bendtner to miss as he drew Denmark level after 32 minutes.
The unmarked Arsenal striker stabbed home Rommedahl's low cross from six yards but it was the sensational raking 60-yard cross-field pass from the impressive Simon Kjaer that really caught the eye - and caught Benoit Assou-Ekotto out of position.
Both teams might have scored again before the break as some atrocious defending ensured the game became an increasingly enjoyable spectacle.
Song blocked a goal-bound strike from Tomasson, while Eto'o struck the post with a drilled effort before Sorensen denied Emana after the Cameroon forward had been allowed to easily skip his way through the centre of the Danish defence.
The match continued to seesaw after the restart, with Sorenson tipping over a header from Stephane Mbia and Kjaer shooting inches over the crossbar.
But a swift Danish counter led to the game's next goal, with Rommedahl showing a burst of space to easily skip past substitute Jean Makoun before precisely slotting the ball across Hamidou Souleymanou and into the bottom corner.
Makoun had been covering for right-back Assou-Ekotto, who seconds earlier had been involved in a break almost led to a Cameroon goal.
Stung into action, the African side responded, with Webo heading wide and Makoun shooting over.
Denmark held their shape and showed a steel to preserve their lead but suffered a blow late on when Kjaer picked up a booking that means he will miss the match against Japan.
Even so, it was Olsen's team who were celebrating at the final whistle while Cameroon's only win since the 1990 World Cup remains a 1-0 victory over Saudi Arabia in 2002.
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|