The United States reached the knockout stage of consecutive World Cups for the first time, just not the way the Americans wanted.
Germany beat the USA 1-0 on Thursday (local time) in soggy Recife on Thomas Mueller's 55th-minute goal to win Group G, but the Americans held onto second place when Portugal defeated Ghana 2-1 in a game played simultaneously in Brasilia.
The Germans, three-time World Cup champions, finished with seven points, while the USA had four after allowing a 95th-minute goal against Portugal in a 2-2 draw. Portugal also had four points, but the Americans advanced from the so-called "Group of Death" because their goal difference was even and the Portuguese were minus three.
The Americans will play the Group H winner, likely Belgium but possibly Algeria, on Tuesday (Wednesday NZ time) in Salvador.
The Americans sprinted out onto the field at the final whistle, about 30 seconds before the other game ended and made advancement official. Brad Davis raised both hands and led the applauding USA team to the side of the stadium where the majority of American supporters sat.
Just reaching Arena Pernambuco was an accomplishment. A tropical downpour flooded roads in a beach city known as the Brazilian Venice, and the USA bus had to make its way through ankle-to-thigh-high water that slowed traffic and left some cars stalled. Rain fell throughout much of the game, and there were scattered empty red seats.
The game marked meetings of several former international teammates facing each other, an unusual occurrence. American right back Fabian Johnson started for Germany in the 2009 European Under-21 Championship alongside three of Germany's starters: Mats Hummels, Jerome Boateng and goalkeeper Manuel Neuer.
USA coach Jurgen Klinsmann starred for West Germany when it won the 1990 World Cup and coached his homeland to the 2006 World Cup semifinals. His top assistant that year was Joachim Loew, who succeeded him as Germany's coach after the tournament. The two exchanged a hug after the final whistle.
There had been fears before the match that the USA and Germany would not attack each other too much and be satisfied with a draw, which would advance both nations.
The Americans never came close to scoring until second-half injury time.
The script was similar to 2002, when the USA opened with a 3-2 win over Portugal, then tied South Korea 1-1 and lost to Poland 3-0. The Americans advanced 12 years ago because South Korea defeated the Portuguese on an 80th minute goal.
Will Burnley retain their EPL status?