Thomas Mueller fired an unstoppable 20 metre shot to give Germany a 1-0 victory over the United States and top spot in World Cup Group G.
The United States, coached by former German boss Jurgen Klinsmann, also went through to the last 16 despite the 1-0 defeat in rain-sodden Recife.
Portugal's 2-1 victory over Ghana was not enough to overtake the Americans in second place as they lost out on goal difference.
The 1-0 win and Germany's domination of the game answered doubters who had suggested the two sides could be happy with a draw that would see them both through to the second round.
Klinsmann hired German coach Joachim Loew as his assistant when he was in charge of Germany. The two remain friends but both insisted they would go for a win.
Germany went on the attack from the start and in the first 20 minutes the ball was seldom out of the US half. Mueller and his teammates struggled to create clear cut chances though.
The breakthrough came 10 minutes into the second half as US goalkeeper Tim Howard faced more pressure.
Howard punched away a header from Per Mertesacker, but Mueller was waiting on the edge of the penalty area and fired it back in giving the goalkeeper no chance.
Mueller now has four goals in the tournament taking him level at the top of the scorer's rankings with Argentina's Lionel Messi and Brazil's Neymar. – AFP