Brendan Gallagher earned his first career hat trick and the Montreal Canadiens defeated the Philadelphia Flyers 5-1 Thursday night.

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.

More Images
Montreal Canadiens' Brendan Gallagher falls over Philadelphia Flyers defenceman Robert Hagg in front of goaltender Brian Elliott during the third period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Brendan Gallagher earned his first career hat trick and the Montreal Canadiens defeated the Philadelphia Flyers 5-1 Thursday night.

Philadelphia Flyers goaltender Carter Hart eyes the puck as he makes a save during the first period of an NHL hockey game against the Montreal Canadiens on Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

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

Montreal Canadiens goaltender Carey Price watches a shot deflected off Philadelphia Flyers' Wayne Simmonds as Canadiens' Jordie Benn (8) looks for the puck during the first period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

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).

Montreal Canadiens' Brendan Gallagher (11) takes a hit from Philadelphia Flyers defenseman Travis Sanheim during the first period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

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

Montreal Canadiens' Jonathan Drouin (92) and Philadelphia Flyers' Phil Varone fall during the first period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

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

Philadelphia Flyers defenseman Robert Hagg skates off the ice after taking a puck to the face during the first period of the team's NHL hockey game against the Montreal Canadiens on Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

UP NEXT

Montreal Canadiens' Brendan Gallagher celebrates his hat trick against the Philadelphia Flyers during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens' Brendan Gallagher celebrates his hat trick against the Philadelphia Flyers during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens goaltender Carey Price deflects a Philadelphia Flyers shot during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens goaltender Carey Price deflects a Philadelphia Flyers shot during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Philadelphia Flyers' Sean Couturier (14) shoots wide on Montreal Canadiens goaltender Carey Price during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Philadelphia Flyers' Sean Couturier (14) shoots wide on Montreal Canadiens goaltender Carey Price during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

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

Montreal Canadiens' Brendan Gallagher falls over Philadelphia Flyers defenceman Robert Hagg in front of goaltender Brian Elliott during the third period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens' Brendan Gallagher falls over Philadelphia Flyers defenceman Robert Hagg in front of goaltender Brian Elliott during the third period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

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.

Philadelphia Flyers goaltender Carter Hart eyes the puck as he makes a save during the first period of an NHL hockey game against the Montreal Canadiens on Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Philadelphia Flyers goaltender Carter Hart eyes the puck as he makes a save during the first period of an NHL hockey game against the Montreal Canadiens on Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

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.

Montreal Canadiens goaltender Carey Price watches a shot deflected off Philadelphia Flyers' Wayne Simmonds as Canadiens' Jordie Benn (8) looks for the puck during the first period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens goaltender Carey Price watches a shot deflected off Philadelphia Flyers' Wayne Simmonds as Canadiens' Jordie Benn (8) looks for the puck during the first period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

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.

Montreal Canadiens' Brendan Gallagher (11) takes a hit from Philadelphia Flyers defenseman Travis Sanheim during the first period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens' Brendan Gallagher (11) takes a hit from Philadelphia Flyers defenseman Travis Sanheim during the first period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

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.

Montreal Canadiens' Jonathan Drouin (92) and Philadelphia Flyers' Phil Varone fall during the first period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens' Jonathan Drouin (92) and Philadelphia Flyers' Phil Varone fall during the first period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

UP NEXT

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

Canadiens: At Toronto on Saturday.

More AP NHL: https://apnews.com/NHL and https://twitter.com/AP_Sports

Philadelphia Flyers defenseman Robert Hagg skates off the ice after taking a puck to the face during the first period of the team's NHL hockey game against the Montreal Canadiens on Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Philadelphia Flyers defenseman Robert Hagg skates off the ice after taking a puck to the face during the first period of the team's NHL hockey game against the Montreal Canadiens on Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens' Brendan Gallagher celebrates his hat trick against the Philadelphia Flyers during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens' Brendan Gallagher celebrates his hat trick against the Philadelphia Flyers during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens goaltender Carey Price deflects a Philadelphia Flyers shot during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Montreal Canadiens goaltender Carey Price deflects a Philadelphia Flyers shot during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Philadelphia Flyers' Sean Couturier (14) shoots wide on Montreal Canadiens goaltender Carey Price during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)

Philadelphia Flyers' Sean Couturier (14) shoots wide on Montreal Canadiens goaltender Carey Price during the second period of an NHL hockey game Thursday, Feb. 21, 2019, in Montreal. (Paul ChiassonThe Canadian Press via AP)