Patrik Zackrisson's goal midway through the third broke a 1-1 tie and gave Tre Kronor a key victory over Finland.
Zackrisson made a diving stab at a loose puck at 8:53 of the final period, smacking it in before goalie Mikko Koskinen could get over to make the save.
The win earns Sweden a bye to the quarter-finals and placement in the top-division in the overall preliminary-round ranking while Finland now has to play an extra game in the elimination qualifying round on Tuesday.
"It's a face-off situation," Zackrisson described of his winning goal, "and we put the puck to the net. It was just a battle to get to it and put it in. I tried to reach it and got my stick on it. It's pretty cool to score in the Olympics. And it's put the team into the quarter-finals is also great. We wanted to win the group and we've done that."
Today was an anniversary that the Finns might have celebrated had they won. It was 20 years ago today, in Nagano, that Suomi last beat Sweden in the Olympics. Since then, the rivals have played three times, Sweden winning them all (2006, 2010, 2014).
Tonight's game produced only 42 shots, Sweden holding a 23-19 edge.
"It was a big win," said Joel Lundqvist. "This is what we wanted, to go straight to the quarter finals. I think we played really well as a team. It was a tight game, not many chances for either team. We were just battling out there. It's nice to get away with a win here."
The Swedes thought they had opened the scoring midway through the first period on a power play, but video review showed that Par Lindholm tipped the puck in with his stick above the height of the crossbar.
Just four minutes later, though, they put the puck in the net and it counted. The play started in the Sweden zone when goalie Viktor Fasth made a nice pad save off a shot from Petri Kontiola.
Linus Omark picked up the rebound and skated up ice with linemate Anton Lander, feathering a perfect pass to Lander in full flight through the middle. Lander burst in on goal and fired a low shot between the pads of Koskinen at 14:53 to make it 1-0 for Tre Kronor. Fasth earned an assist on the play for his "save pass."
The Finns replied early in the second when Joonas Kemppainen batted a bouncing puck over the goal line at 1:32. The rest of the period was typical, close-checking Finland-Sweden hockey, with few scoring chances, lots of pushing and shoving after whistles, plenty of dump-ins and line changes without many quality scoring chances.
The best of the bunch was a great pass by Sakari Manninen to Jarno Koskiranta who was heading hard to the net. Koskiranta made a perfect re-direct of the pass, but Fasth got his right pad out to make a superb reaction save and keep it a 1-1 game.
After going ahead on Zackrisson's goal in the latter half of the third, there were some tense moments for Tre Kronor. The Finns had a late power play and in the last 30 seconds of it pulled Koskinen to create a six-on-four, but to no avail. When Sami Lepisto incurred a penalty for the Finns, it sealed their fate.
Oscar Moller finished the scoring with an empty netter with 4.3 seconds remaining.