Rookie Jesperi Kotkaniemi and Tomas Tatar also scored for the Canadiens, who won their second straight. Carey Price stopped 29 shots for his 25th victory of the season.

Price is three wins away from tying Jacques Plante as the winningest goaltender in Canadiens’ history with 314 victories.

Michael Raffl scored in the third period for the Flyers, who have dropped two straight after winning three in a row.

Flyers goalie Carter Hart gave up three goals on nine shots before being pulled 10:33 into the game. Backup Brian Elliott stopped 29 of 31 shots in relief.

It was the second straight game in which Hart was pulled. He was lifted after giving up three goals on nine shots in a 5-2 home loss to Tampa Bay on Tuesday.

Gallagher scored the first of three goals just 58 seconds in with a wrist shot from the edge of the face-off circle. It was Montreal’s league-high sixth goal in a game’s opening minute (tied with the Carolina Hurricanes).

The Canadiens scored twice on their first two shots of the game . Kotkaniemi netted his 15th of the season at 3:11.

Gallagher chased the 20-year-old Hart from the game when he made it 3-0 with a shot from an impossible angle, along the goal line from the corner of the rink.

Elliott fared better but he couldn’t slow Montreal down.

Gallagher completed his hat trick 2:56 into the second period with a backhanded shot into the top corner, with his back to the net. It was his first three-goal effort in 467 NHL games.

Tatar added a goal three minutes later with a wrist shot off a no-look pass from Max Domi behind the net.

With the assist, Domi set a career high with 53 points.

Raffl scored for the Flyers in the third period by deflecting Shayne Gostisbehere’s shot past Price at 10:23.

Notes: UFC legend Georges St-Pierre was honored at the Bell Centre after announcing his retirement. … Montreal plays seven of its next eight games away from home. . The Flyers had not lost on the road since Jan. 12. . Phillip Danault set a career high with 41 points.

UP NEXT

Flyers: Home against Pittsburgh on Saturday at Lincoln Financial Field as part of the Stadium Series.