United States 1-2 Ghana
Asamoah Gyan's extra-time strike preserved African interest in SA2010, setting up a quarter final for Ghana with Uruguay
Kevin-Prince Boateng scored after just four minutes but the United States came from behind yet again when Landon Donovan equalised with a second-half penalty.
But the Black Stars restored their advantage when Gyan broke clear to score at the start of the added period and they held on to secure their place in the last eight.
Both sides had already had shots on goal when Ghana grabbed the lead with just four minutes gone.
Ghana's Samuel Inkoom drove well wide from distance and US winger Clint Dempsey drilled straight at goalkeeper Richard Kingson.
But the Americans paid a heavy price for Ricardo Clark being robbed of possession near half-way.
Boateng broke forward and, with Jay De Merit backing off, clipped a low shot into the corner of Tim Howard's net.
The goal-scorer was full of confidence and lifted a shot over from Andre Ayew's cross before Jozy Altidore dragged wide at the other end.
Gyan had a free kick punched away by Howard and Inkoom produced a wild cross after Carlos Bocanegra's desperate block.
Boateng was shooting at every opportunity and let fly again from 25 yards only for Howard to block.
The Americans finally clicked when Dempsey seized on Jonathan Mensah's loose pass and slid through for Robbie Findley but Kingson made a solid stop with his legs.
Howard kept Bob Bradley's side in the game when he pulled off a low stop from Kwadwo Asamoah after De Merit misjudged a long clearance.
The United States almost pulled level within a minute of the restart when half-time substitute Benny Feilhaber was denied by Kingson.
But on the hour, the States hauled themselves all square after Jonathan Mensah chopped Dempsey down in the box and Donovan stepped up to fire in his penalty off the inside of the post.
Michael Bradley passed up a great chance to win it for the States, shooting straight at Kingson and the game slipped into extra time.
But three minutes into the added period, Ayew lobbed over the top and Gyan held off Carlos Bocanegra and lifted a shot over Howard.
The United States failed to threaten until the final moments when Herculez Gomez had a shot deflected wide and Kingson dealt with a number of long balls into the area.
United States (4--4-2): Howard; Cherundolo, DeMerit, Bocanegra, Bornstein; Donovan, Bradley, Clark (Edu 31), Dempsey; Altidore (Gomez 91), Findley (Feilhaber 46).Subs (not used): Guzan, Hahnemann, Spector, Onyewu, Goodson, Beasley, Holden, Torres, Buddle
Ghana (4-1-4-1): Kingson; Pantsil, Jonathan Mensah, John Mensah, Sarpei (Addy 73); Annan; Inkoom (Muntari 113), Boateng (Appiah 78), Ayew, Asamoah; Gyan.Subs (not used): Agyei, Ahorlu, Derek Boateng, Muntari, Ibrahim Ayew, Owusu-Abeyie, Tagoe, Amoah, Adiya