It wasn't easy, but Germany's narrow 1-0 win was enough for them to top the Group of Death and ensure their place in the knockout round for the 15th consecutive time at the World Cup.
The performance was a big improvement on the disappointing showing against Ghana earlier in the week. But most importantly, it proved that captain Philipp Lahm belongs in midfield for Joachim Low's team.
The 2-2 draw with Ghana raised several questions, most notably Lahm's role in the team. Low only just started using him in midfield a couple of months before the World Cup after playing at either right-back or left-back since his debut in 2004.
Following Pep Guardiola's lead at Bayern Munich, Low changed the team's system and practically built it around Lahm in midfield. The lack of an adequate replacement at either full-back position led many to question whether moving him into midfield actually benefited the team.
Low used Lahm in midfield in a friendly against Italy in November last year but wouldn't get the chance to do it again until about a month before the tournament in friendlies against Chile and Armenia.
With so few chances to adequately test the new system, they'd have to go into the tournament somewhat cold. It was a gamble that Low needed to make considering the injuries to the squad and Bastian Schweinsteiger and Sami Khedira's fitness concerns.
Against Portugal his selection was justified. Germany dominated a 10-man Portugal, and Lahm was imperious on the pitch. Along with Toni Kroos and Khedira, he ran the game and had next to no issues down the flanks.
The Ghana game, on the other hand, was a different matter entirely. Germany struggled to deal with the physicality and pressure of the Ghanaians, and Lahm turned from midfield anchor to midfield liability, being personally responsible for the second goal they conceded.
Furthermore, Germany's full-backs were exposed throughout the game. Jerome Boateng and Benedikt Howedes, center backs by nature, were attacked relentlessly and proved to be real weak spots, defensively and offensively.
Suddenly people were calling for a return to Germany's old system and Lahm to plug one of those full-back spots. The logic was that if Germany are going to use a center back out wide, they may as well use Lahm on the other flank.
Return Lahm to defense and stabilize the back line. That was the call following what could have easily been a loss to Ghana.
Only Low didn't quite see it that way. He remained convinced Lahm best served the team in the middle of the field and declared he would stay there before the U.S. match.
He also had to compensate for an injured Sami Khedira, who couldn't complete the Ghana game and had to be taken out. But the return of Schweinsteiger now allowed him to play a midfield three of all Bayern Munich players, and it worked like a charm.
Even more than the Portugal game, Germany's midfield was dominant against the United States. Schweinsteiger, Kroos and Lahm combined for a total of 313 passes, almost as many as the entire U.S. team combined.
More impressive than anyone was Philipp Lahm, who had a match-high 125 touches and 116 passes, an impressive 95 percent passing accuracy and a vital match-winning block at the end of the game.
It was the best midfield performance yet from Lahm for Germany, and it completely validated Low's selection.
Germany's control against Portugal was helped in large part by Pepe's early dismissal, while the Ghana game was a case of the second-game syndrome that has been bugging Germany at the World Cup, but the U.S. match showed just how important Lahm is for the team in that position.
Lahm played the dual role of destroyer and distributor brilliantly. He absorbed or interrupted every U.S. counterattack but also kept the game flowing seamlessly for his team. If Lahm made uncharacteristic errors against Ghana, he had a characteristically flawless showing against the U.S.
His presence in midfield also allowed Schweinsteiger to play his natural game. It is no coincidence that with Lahm behind him, Schweinsteiger enjoyed his best game for Germany in more than a year.
Low found a winning formula with Lahm, Kroos and Schweinsteiger in midfield, and it is all made possible because of Lahm's positional discipline and tactical understanding of the game.
There is a reason Guardiola employed Lahm there, and Low very much sees things the same way. Pure and simple, Lahm's reading of the game is second to none in the squad. When Lahm performs well, so does the rest of the team around him.
If Germany go far in Brazil, it will be with Philipp Lahm anchoring them in midfield.
All statistics courtesy of WhoScored.com.
Like the new article format? Send us feedback!