MONTREAL — With first place already in the bag, Sweden wanted to make some history at the world junior hockey championship.

Paced by Jonathan Dahlen's hat-trick, the Swedes downed the Czech Republic 5-2 on Saturday in the final preliminary round game for both teams. They also posted a 40th consecutive group stage win since 2007.

"We had a special game because we had nothing to play for," said coach Tomas Monten. "We'd already won the group, so we said '40 games, 10 years, that's a record that will be tough to beat.'

"I think the players wanted to be involved in that historical moment and we used it as a trigger before the game."

The Swedes haven't lost a group stage game since they fell in overtime to the United States in 2007, but they only have one world junior gold medal in that span in 2012 and they were shut out of the medals the last two years.

The hard part comes next as they get ready to play in the quarter-finals starting Monday.

Monten was glad to finish first in the group because they can stay in Montreal, avoiding the stress and hassle of having to move to Toronto for the knockout game.

They finished off the first round with a clear win over the Czechs despite starting backup goalie Filip Gustavsson, resting banged up defenceman Gabriel Carlsson and playing a relatively loose defensive game.

"We're finding ways to win games," said Dahlen, a second round pick by the Ottawa Senators in June. "We maybe haven't played our best hockey yet.

"It's comforting to feel we can still play better. We can shoot more and defensively, we have a couple of things to work on."

Rasmus Asplund and Jens Looke also scored for Sweden (4-0-0).

David Kase and Filip Hronek scored late goals for the Czechs (1-1-2), who will know their final placing after a game later Saturday between Switzerland and Finland. They are seeking a first world junior medal since winning bronze in 2005.

Czech coach Jakub Petr said that while scoring chances were even, the Swedes' overall skill was the difference.

"The way they get scoring chances and capitalize on them, that's a big difference between our team and them," said Petr. "After the first period, it was 3-0. We had chances from the slot, rebounds, but that's where we struggled. If we scored a goal or two it could have gone another way, but at this time, Sweden was the best team in this group."

Shots were 38-37 in the Czechs favour.

Asplund, a Buffalo Sabres second round pick in June, scored only 47 seconds into the game as he banged in Filip Ahl's rebound on a two-on-one rush.

He followed that with a thundering open ice hit on Kase, which may have been what prompted the Czech forward to take a tripping penalty with a run at a Swedish player at 8:42. Only 12 seconds into that power play, Dahlen put Asplund's diagonal pass into an open side.

Looke got credit for an own goal by Czech forward Lukas Jasek. A pass went off Jasek to the net and the Vancouver Canucks prospect then accidentally pushed it into the net with a skate at 16:56.

Goalie Daniel Vladar looked to have made the save when Dahlen took a feed from Frederik Karlstrom and went in on a breakaway, but the puck slid into the net at 17:09 of the second frame.

Dahlen went to the net on a power play and saw his backhander trickle through Vladar's pads 3:34 into the third.

Gustavsson made the first save but Kase went to the net and jammed in a goal at 13:09 of the third period. Hronek followed with a power-play goal on a high shot from the point at 17:28.