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 U.S. 1-0 Thursday 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.
"Obviously it's a huge achievement by our team to come through that group and qualify for the knockout stage," U.S. coach Jurgen Klinsmann said.
The Germans, three-time World Cup champions, finished with seven points, while the U.S. had four after allowing a 95th-minute goal against Portugal on Sunday in a 2-2 draw. Portugal also had four, 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 put possibly Algeria, Tuesday in Salvador.
"Once the group is done, another tournament starts," Klinsmann said. "Whoever it is, we'll be prepared."
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 U.S. 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 U.S. 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 Thursday: Mats Hummels, Jerome Boateng and goalkeeper Manuel Neuer.
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 exchange a hug after the final whistle.
There had been fears before the match that the U.S. and Germany would not attack each other too much and be satisfied with a draw, which would advance both nations. Germany dominated possession with 60 percent and the Americans didn't threaten until second-half injury time.
The script was similar to 2002, when the U.S. 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.
More World Cup coverage:
Your get-out-of-work note
Suarez banned 4 months for biting
Why Ghana flew $3M to the World Cup
167 people cash in on Suarez bite bet
Erratic World Cup shakes Goldman projections
Coke may have won World Cup but lost India
China spat stops World Cup bets
The real winner of the US-Portugal game
Can Team USA lift market sentiment?
English soccer creates cash but no Cup
Are workers less productive during the World Cup?
—By The Associated Press.