ST. PETERSBURG, Russia -- Taylor Hall scored twice as Canada survived a second-period scare and defeated Germany 5-2 Thursday at the world hockey championship.

The Germans scored twice in the second to tie the game 2-2, forcing Canada coach Bill Peters to juggle his lines.

Canada responded quickly as Hall scored his second of the game, and team-leading fifth of the tournament, at the 3:54 mark of the third period on a pass from Edmonton Oilers teammate Connor McDavid.

Corey Perry and Cody Ceci both scored on the power play for Canada, while Boone Jenner's first of the tournament came at even strength.

Patrick Reimer and Sinan Akdag replied for Germany.

Canada moved into a tie with Finland for first place in Group B. Both teams have 12 points from four regulation wins.

It appeared that the win could come at a high price. Perry briefly left the game favouring his knee midway through the second period after an accidental mid-ice collision with Germany's Tobias Rider, but Canada's captain to action after missing just a couple of shifts.

Forward Brad Marchand, a game-day decision due to injury, took a regular shift for Canada, but Mark Scheifele did not dress due to illness.

The Germans pressed Canada hard in the game's early going, keeping the shot margin to a narrow 15-12 through the first 40 minutes and pressuring goaltender Cam Talbot in front of his net.

Trailing 1-0 in the late stages of the first period, Germany had an apparent goal from a two-on-one disallowed when it was ruled that forward Gerrit Fauser had kicked the puck into the net.

Talbot made 17 saves to record his third win of the tournament, while Timo Pielmeier stopped 17 of 22 shots.

Goaltender Thomas Greiss was added to Germany's roster before the game after his New York Islanders were eliminated from the NHL playoffs. He served as Pielmeier's backup.

The win extends Canada's world championship winning streak to 14 games, including the team's 10-0 run to the gold medal in Prague in 2015.

In other Group B action, the United States shut out France 4-0.

Group A action in Moscow delivered two lopsided results. The Czech Republic remained unbeaten after a 7-0 win over Norway, while the host Russians improved their record to 3-1 after decimating Denmark by a score of 10-1 in the late game at the Ice Palace.

Canada's next game will come against 2-2 Slovakia on Saturday.