COLOGNE, Germany — Nicklas Backstrom and Oliver Ekman-Larsson scored in the shootout for Sweden as it beat Canada 2-1 on Sunday to capture gold at the world hockey championship.

Victor Hedman scored late in the second period shorthanded to give the Swedes a 1-0 lead. Henrik Lundqvist picked up the win in net with 42 saves.

Ryan O'Reilly tied the game at 1-1 with a power-play goal early in the third. Calvin Pickard stopped 40 shots and took the loss.

The win is Sweden's first in four tries against Canada since the IIHF instituted the playoff system in 1992, and their first since 2013. Sweden stops Canada from being the first team to three-peat since the Czechs accomplished the feat between 1999 and 2001.

Just like in Saturday's 4-2 semifinal comeback win over Russia, there was no scoring in the first period. After competing in separate groups in the preliminary round, the Swedes and Canadians went through a feeling-out process. Shots were 12-10 for Sweden in the first, with Canada easily able to kill off two penalties against the ninth-ranked Swedish power play.

Hedman got Sweden on the scoreboard with Nicklas Backstrom serving his second penalty of the game. Hedman's bouncing shot from the point off a broken play eluded Pickard with 20.8 seconds left in the period.

The Canadians once again used their lethal power play to get back into the game in the third with Elias Lindholm whistled for high sticking at 1:48. It took just 10 seconds for O'Reilly to tie the game at 1-1 by flipping a Mitch Marner rebound over the right shoulder of Lundqvist. It was the first special-teams goal that Lundqvist had surrendered in five tournament games.

Canada tested its tournament-best penalty kill when Mike Matheson took a tripping penalty with 3:18 to play in the third period, but the Swedes matched them with an untimely too-many-men penalty with 1:24 left on the clock.

Sweden had a slight territorial edge in overtime by outshooting Canada 11-10. Sean Couturier was whistled for tripping with 10:51 left in overtime but the Canadian penalty killers were up to the task.

Alex Killorn fed Matt Duchene with a nifty spin-o-rama pass late in overtime, but his shot was stopped by Lundqvist.

Sweden called a timeout to set up an offensive-zone faceoff with 21 seconds left to play in overtime. Claude Giroux won the crucial draw to allow the Canadians to get the puck out of danger and set up the shootout.

In the shootout, William Nylander was denied by Pickard, then Nathan MacKinnon couldn't slip his shot through Lundqvist's five-hole. Backstrom, Sweden's second shooter, beat Pickard low to the stick side before Brayden Point's attempt was snagged by Lundqvist's glove. Oliver Ekman-Larsson caught Pickard moving to put Sweden up 2-0, then Ryan O'Reilly was denied by Lundqvist. Pickard kept Canada alive by stopping his Colorado Avalanche teammate Gabriel Landeskog before Lundqvist stopped Marner to secure the gold for Sweden.

Earlier on Sunday, Russia defeated Finland 5-3 to capture its second consecutive bronze medal.