Martin Frk's goal with 1:07 left in the second period snapped a tie game and helped the Czech Republic finish its run at the 2013 IIHF World Junior Championship with a 4-3 win against Switzerland in the placement game.
Tomas Hyka had a goal and two assists, and Tomas Hertl had a goal and an assist as the Czechs finished fifth for the second consecutive year.
Sven Andrighetto, a 2013 NHL Draft prospect who plays for Rouyn-Noranda in the Quebec Major Junior Hockey League, had a pair of goals for Switzerland, which finished sixth.
Switzerland led 1-0 after one period, but goals by Dmitrij Jaskin and Hyka put the Czechs up. Just 1:17 after Hyka's goal, Andrighetto scored to tie it. However, 14 seconds later, Frk put the Czechs up for good.
Hertl added an insurance power-play goal at 11:27 of the third. Andrighetto scored a power-play goal with 1:02 left to get Switzerland within a goal, but that was as close as they would get.
Czech goalie Patrik Bartosak stopped 20 of 23 shots in the win.
In the relegation round, Germany beat Latvia 5-2 to remain at the top level of WJC play. Latvia was relegated to Division I, Group A for next year.
Leon Draisaitl, a top 2014 NHL Draft prospect who plays for the Prince Albert Raiders of the Western Hockey League, scored a pair of goals, including the go-ahead goal in the second period.
"Our goal is always to stay in the top division. We did that, so everything is good," Draisaitl told the IIHF website. "We didn't play that well in the first period, but we were pushing hard in the second period and played well in the third."
Latvia led 1-0 after one period on a goal by Lauris Rancevs, but Germany's Tobias Rieder scored six seconds into the second to tie the game, then Draisaitl, who is tied for third among first-year WHL players with 28 points in 33 games, scored a power-play goal at 10:30 to put Germany ahead for good.
Christian Kretschmann scored with 3:56 left in the second to put Germany up 3-1. Germany outshot Latvia 22-6 in the second, and 40-27 for the game.
Draisaitl scored his second 5:36 into the third to make it 4-1 and dig a hole too deep for Latvia to climb out of.
"I definitely have to say thank you to my linemates; they made it easy for me," Draisaitl said. "The first [goal] was a great pass from Dominik Kahun, I just had to tip it in. And for the second one I got a nice pass from Tobias Rieder. Once we scored the 1-1 goal we were on a roll and it became easier for us."
Germany finishes ninth and will remain at the top level of the WJC in consecutive tournaments for the first time since 1998.
Latvia, which had played in four of the past five top-level World Juniors, finished last among the 10 teams and will be replaced by Norway at next year's tournament, which will be played in Sweden.
"Of course we are very disappointed. Nobody wanted to lose this game," Latvia goalie Elvis Merzlikins told the IIHF website. "We had too many penalties [24 penalty minutes]. We wanted to win so much that we took too many penalties. Now we have to battle to get back to the top division next year."
In the other relegation-round game, Finland scored the game's first six goals and cruised to an 11-4 defeat of Slovakia.
Joel Armia had a hat trick plus an assist, and Miikka Salomaki and Teuvo Teravainen had a pair of goals each as Finland finished in seventh place. The 11 goals were the most scored by any team in the tournament so far.
Andrej Bires had a pair of goals for Slovakia, which placed eighth.
Finland started its run 3:53 into the game when Ville Jarvelainen scored. Salomaki and Armia also scored in the first to put Finland up 3-0 after one period.
Top 2013 NHL Draft prospect Aleksander Barkov scored 1:14 into the second, then Armia scored twice in 32 seconds to cap his hat trick and make it 6-0.
Slovakia scored three in a row to cut the Finland lead in half, but Salomaki's second of the game made it 7-3 with 2:13 left in the second.
Bires scored early in the third to get Slovakia within in 7-4, but that was as close as it would get. Goals by Artturi Lehkonen and Olli Maatta sandwiched a pair by Teravainen to close the scoring.
Contact Adam Kimelman at email@example.com. Follow him on Twitter: @NHLAdamK