The United States played its final preliminary tilt of the men's Olympic hockey tournament Sunday morning hoping to earn the No. 1 seed for the playoffs. It didn't come easy, but the Americans picked up the big 3-2 win over a gutsy German team to stay unbeaten at the Games.

While the U.S. ended up getting the win, it was the Germans who struck first after Patrick Hager netted a power-play marker just two minutes into the game. The Americans responded quickly, though. Just 2:26 after Hager's ice-breaker, Steven Kampfer tied the game with a blast from the point for a power-play goal of his own.

Both teams went into the first intermission tied at one goal apiece, but it didn't take the U.S. long to break the tie in the middle period. At the frame's 4:50 mark with chaos in front of the German net, Matt Knies picked up a loose puck in front and roofed it to give the Americans their first lead of the game.

The Americans began the third period on a fresh two-minute power play. They couldn't convert on it, but it only took them 47 seconds after the advantage expired to extend their lead. Following a German turnover in their own zone, Nathan Smith backhanded a loose puck through Danny aus den Birken's five-hole, giving the U.S. a 3-1 advantage. The Americans had their backs up against the wall late in the third period after Tom Kuhnhackl cut the U.S. lead in half, but thanks to some crucial blocked shots, they hung on to earn the win.

Never a dull moment for U.S. hockey.

After earning a shutout in his Olympic debut, goaltender Drew Commesso was solid in net for the Americans. He stopped 24 of 26 German shots to earn his second win of the tournament. The 19-year-old may be young, but he's been a steady backstop thus far in his two starts.

Penalties were one of the big stories of this game. There were eight total penalties assessed, and the U.S. penalty kill, despite giving up an early goal on the man advantage, did an outstanding job of keeping the Germany power play in check. The U.S. ended the tilt successfully killing three of Germany's four power plays, and their strong short-handed play ended up playing a crucial role in the victory.

With the win, the Americans successfully clinched the No. 1 seed for Group A heading into the playoffs and earned a bye in the elimination round to advance directly to the quarterfinals. It's still unclear who the U.S. will take on in their first playoff game.

Click here to view all the stats from the U.S.'s win over Germany, and click here to watch the full event replay from start to finish. Watch the remainder of the games in the Olympic hockey schedule on Peacock or here on NBCOlympics.com.

Editor's note: Relive the action from the U.S. victory over Germany with live updates from the contest below.

First period

0:00 - The Americans take the ice in their lighter blue uniforms. Germans in white. Puck is dropped and the action is officially underway.

1:14 - Brock Faber gets called for a penalty and the Germans head to the man advantage.

2:00 - Germany gets on the board first with a power-play goal. Patrick Hager gets credit for the tally. Not an ideal start to this game for the Americans, folks!

3:14 - Lots of slashing after a whistle and the Americans get their first power play of the game. Big opportunity to knot the game back up after the inauspicious start.

4:26 - Steven Kampfer lets one rip from the point and it gets past German netminder Danny aus den Birken on the power play. We have a 1-1 game. Huge response from the Americans.

5:35 - Americans are headed back to the power play. Marcel Brandt got caught holding. You can't do that.

6:11 - And the U.S. power play already comes to an end. Kenny Agostino gets a double minor for high-sticking. Penalties everywhere to start this contest.

10:11 - The U.S. successfully kills off the double minor. Big confidence boost for the American PKers.

12:09 - Brandt needs help getting off the ice after taking a hard shot to a specific region that no one wants to get hit in!

20:00 - First period ends the way it started; all tied up. Both teams with one goal apiece.

Second period

2:02 - Quality scoring chance for the Americans. Nick Abruzzese with the opportunity, but couldn't convert.

4:50 - Matt Knies scores to give the U.S. its first lead of the game. Tons of chaos in the Germany zone leading up to the score, but he finally finds the back of the net to make it 2-1. The goal was reviewed for goalie interference, but the goal was deemed legal. As a result, the U.S. gets a power play due to the unsuccessful challenge.

6:50 - No luck on the power play for the U.S. and the game returns to 5-on-5.

8:09 - So. Many. Penalties. Now Brendan Brisson goes to the box for tripping and Germany heads to the man advantage.

11:09 - Another successful penalty kill for the Americans. Aside from the early blemish, the U.S. PK has largely looked pretty solid.

15:39 - You'll never believe this, but another penalty has been called. Noah Cates heads to the box for tripping, and the Germans get their fourth power play of the game.

17:39 - Another successful kill for the U.S. penalty kill. They've been the MVPs of the game so far for the Americans.

20:00 - The Americans were buzzing in the offensive zone late in the middle period and, as a result, drew a penalty. They enter the intermission with a fresh two-minute power play waiting for them in the third stanza.

Third period

2:00 - The U.S. began the third period with a power play, but couldn't convert on it. The German penalty kill has been quite impressive as well.

2:47 - Nathan Smith scores to double the U.S. lead. They couldn't score on their power play, but they ended up extending their lead anyway not long after it was killed off. Germans with lots of work to do.

17:31 - This one isn't over yet. Tom Kuhnhackl, formerly of the Pittsburgh Penguins, scores to make it a one-goal game. Suddenly the Germans have all the momentum in their favor.

20:00 - Well, that was terrifying. The Germans came close to tying the game up a couple times, but the U.S. held on to earn the No. 1 seed in Group A and advance directly to the quarterfinals. You can breathe now!