STOCKHOLM — Jhonas Enroth raised his hands in triumph after refusing to let Canada and Jordan Eberle beat him a second time. Lindy Ruff could only watch and prepare for the long flight home without a medal.

Enroth backstopped Sweden to a 3-2 shootout victory over Canada on Thursday in the quarterfinals of the world hockey championships. The Buffalo Sabres goaltender stopped 39 shots in regulation and overtime, then turned aside three of Canada’s four breakaway attempts.

“Jhonas is one of the most competitive players I’ve ever seen,” Sweden defenseman Erik Gustafsson said. “He showed that in the shootout. Nerves of steel.”

Loui Eriksson and Eberle scored in the three-round shootout to send it sudden death. Fredrik Pettersson ripped a point-blank slap shot past Canada goalie Mike Smith, and Enroth sealed the win by stopping Eberle on his second chance.

Sweden and co-host Finland will meet in the semifinals Saturday. The United States will face surprising Switzerland in the other semi.

Canada, meanwhile, will head home without a medal for the third straight year. Ruff, who coached Enroth in Buffalo for three-plus seasons, was the Canadian bench boss.

“Third period, we weren’t on top of them as much as we could be,” Ruff said. “Their defending was a lot better.”

Canada’s Steven Stamkos opened the scoring and had a chance to make it 2-0, but Enroth stopped him on a breakaway. Nicklas Danielsson followed with a pair of power-play goals, and Claude Giroux tied it with 9:10 to play.

“He kept us in the game and played amazing,” Gustafsson said of Enroth, who suffered a 3-0 loss to Canada in the preliminary round. “In the second period, if Stamkos scores on the breakaway it’s a different game.”

Canada sustained another loss when captain Eric Staal suffered a seemingly serious injury on a knee-to-knee hit by Alex Edler. Ruff had no update on the status of Carolina’s star.

The United States advanced by routing Alex Ovechkin and Russia, 8-3, in Helsinki. Paul Stastny had two goals and four points as the Russians allowed the most goals in their tournament history. John Gibson, 19, made 31 saves for the Americans.

Switzerland moved to 8-0 with a 2-1 win over Czech Republic, while Finland tripped up Slovakia, 4-3. Buffalo defenseman Andrej Sekera scored for the Slovaks.