Landon Donovan's dramatic stoppage-time goal secured a narrow victory over Algeria and fired the United States into the last 16 of the World Cup as group winners.
The US were on the brink of going out of the competition when Donovan followed up a sharp save from goalkeeper Raid Ouheb M'bolhi in the 92nd minute to smash the ball home.
Until that moment it had been a story of inspired saves from M'bolhi, poor American finishing and a lineman's error, which denied Clint Dempsey a goal in the first half.
But Donovan's late intervention delivered a deserved victory, which pushed England into second place in Group C on goals scored following their 1-0 victory over Slovenia.
The Algerians, who would have been going out even with a draw, had captain Anther Yahia sent off after receiving a second yellow card in the dying moments.
The first meeting between the teams came alive after five minutes when an Algerian long ball was totally missed by Jay DeMerit on its way through to Rafik Djebbour, who chested it down before volleying against the bar.
Moments later, at the other end, a long-range strike from US striker Hercules Gomez was pushed aside by M'bolhi.
Watched by former US president Bill Clinton, the Americans became more dominant as the half wore on and should have taken the lead after 20 minutes when Dempsey's effort was harshly ruled out for offside.
First Donovan's shot was brilliantly saved by M'bolhi but when the ball rebounded to the attacker, he quickly squared it to Dempsey, who turned it into the net, only to see his celebrations thwarted by the linesman's flag.
Dempsey went close again before Jozy Altidore missed the clearest opening of the half, blazing wastefully over the bar from five yards.
Algeria, who qualified for the finals via a play-off victory over Egypt, showed plenty of promise in their build-up play, only for most of their attacks to fizzle out on the edge of the penalty area.
The second half began in a similar manner with the Americans on the front foot and once again it was Dempsey who could have broken the deadlock.
Fed by Altidore, his first effort crashed back off the post, and his second was slashed wildly wide with left foot.
Knowing that a victory would send them through, US coach Bob Bradley threw on attackers Edson Buddle and Benny Feilhaber, whose low shot was saved by the legs of M'bolhi.
With the Americans committed to attack, Algeria began to threaten on the break and Karim Ziani flashed a low shot wide when well-placed inside the box.
But just as the Americans appeared to be running out of steam, the winning goal finally arrived.
Altidore raced clear down the right and crossed for Dempsey, whose point-blank effort was parried by the goalkeeper. The loose ball rolled into the path of Donovan, who made no mistake from six yards to send the American players and fans into raptures.
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|