The USA produced a barnstorming display to thump Egypt and surprisingly reach the Confederations Cup semi-finals.
With Brazil 3-0 winners against Italy in the other Group B game, the USA, who had lost their opening two games, went through at Egypt and Italy's expense.
Egypt goalkeeper Essam Al Hadari's spilled Jozy Altidore's cross and Charlie Davies pounced for the opener.
After the break the USA upped the tempo and after Michael Bradley sidefooted in Clint Dempsey headed home the third.
Dempsey's goal ensured the USA qualified under the most unlikely circumstances and will now play European champions Spain in the first semi-final in Bloemfontein on Wednesday with South Africa up against Brazil in Johannesburg on Thursday.
Egypt were missing striker Mohamed Zidan with a hamstring injury and his replacement Ahmed Abdel-Ghani was guilty of missing several first half chances in the early exchanges.
But the USA also had several attacks before finally going ahead, with Egypt up to that point thankful to Al Hadari for keeping them in the game.
But Al Hadari was at fault for the opener when after failing to take Altidore's cross from the right, he was then involved in a mix up between Ahmed Fathi and Hani Said before Davies diverted the ball in off the keeper for 1-0.
Soon after Landon Donovan embarked on a weaving run, finding himself one on one with the Egyptian keeper and only Al Hadari's bravery prevented him from making it 2-0.
Chances came and went at both ends into the second half and the US were denied a penalty when Said blocked Altidore's shot on the line with a combination of his thigh and arm.
With Italy 3-0 down in the other game, Egypt knew that if the scores remained the same they would still qualify, but that left them in two minds as to whether they should defend or attack.
And the US took advantage of their indecisiveness with two goals in the final 30 minutes.
Bradley's low shot found the back of the net for 2-0 and with 20 minutes remaining the diving figure of Dempsey superbly held off the challenge of Wael Gomaa to head home the vital third.
Late pressure followed but US keeper Brad Guzan kept Egypt out to set up a semi-final meeting with Spain.
Egypt: El Hadari, Fathi (Said Ahmed 57), Said, Gomaa, Farag, El Mohamady, Shawky, Abd Rabou, Abdel-Ghani (Abu Greisha 62), Aboutreika, Eid (Hassan 50). Subs Not Used: El Sayed, Fathallah, Khairy, Zidan, Homos, Tawfik, Moawad, Raouf, Sobhy.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.