MONTREAL -- Scott Hartnell and the Philadelphia Flyers took advantage of a suddenly shaky Carey Price to keep their slim playoff hopes alive.
Hartnell had a hat trick, and Claude Giroux and Jakub Voracek added three points apiece for Philadelphia, which ended a four-game losing streak with a 7-3 win over the Montreal Canadiens on Monday night.
Wayne Simmonds had a goal and an assist, and Erik Gustafsson also scored for the Flyers, who are in 12th place in the Eastern Conference.
"Carey Price obviously didn't have his best night," said Hartnell, who scored his first two against the Montreal starter in the second and completed his hat trick against Price's replacement, Peter Budaj, in the third.
Ilya Bryzgalov made 25 saves for the Flyers.
Philadelphia, which has not missed the playoffs since 2007, is seven points out of the eighth and final playoff spot with six games remaining.
Price, who was chased for a second straight start, stopped 23 shots in two periods. He allowed six goals and was replaced by Budaj at the beginning of the third. Budaj stopped three of the four shots he faced.
"We didn't help him at all," Canadiens center Tomas Plekanec said. "He's our goalie and we should help him out, but we didn't. It's definitely not his fault. He made two big stops in the first period, and it could have been way more than 2-1 after the first."
Max Pacioretty had a goal and an assist for the Canadiens, who lost their second in a row. Rookies Brendan Gallagher and Alex Galchenyuk also scored for Montreal, which remains in first place in the Northeast Division -- despite losing three of four -- with 57 points.
The Canadiens have six games remaining, one fewer than the Boston Bruins, who are one point behind in second place. The Bruins' game against the Ottawa Senators was postponed after Monday's bombings at the Boston Marathon.
"It's terrible. It really is," Flyers coach Peter Laviolette said. "My family's from there. My sister was there, and it's just devastating. You read the reports and I'm sure it's probably going to get worse and more gruesome as it unfolds. It's just a real tragic event that happened."
Hartnell scored two of the Flyers' four goals in the second, including a power-play tally with 33 seconds left to put Philadelphia up 6-3. He completed his seventh career hat trick with his seventh goal of the season on Budaj 12:45 into the third.
"It's a lot more fun to play games like that than 0-0, or 7-0 the other way," said Hartnell, who has six hat tricks with the Flyers.
Simmonds and Gustaffson scored just over three minutes apart to give Philadelphia a 2-0 lead 5:49 in.
The Canadiens came back to tie it at 2 on power-play goals by Pacioretty, who scored with 57.2 seconds left in the first, and Gallagher, who got his 13th 38 seconds into the second.
Voracek got his 18th goal 24 seconds later to put the Flyers up 3-2, and Hartnell made it a two-goal lead again at 7:30.
Galchenyuk drew the Canadiens within 4-3 at 9:11 of the second.
Giroux scored his 13th at 10:56 to make it 5-3.
Price was pulled midway through the first period of Montreal's 5-1 loss in Toronto after allowing three goals on four shots.
NOTES: Flyers defenseman Kent Huskins left the game 6:11 in after he was struck in the head on an open-ice hit by Montreal's Ryan White. Flyers GM Paul Holmgren announced on the team's Twitter feed that Huskins suffered a concussion and would not return. White, who appeared to catch Huskins with his left elbow, was given a game misconduct and majors for a headshot and for fighting with Philadelphia's Kurtis Foster, who got a minor for instigating, a fighting major and a misconduct after coming to his teammate's defense. ... Canadiens coach Michel Therrien kept left wing Brandon Prust out of the lineup for precautionary reasons. Prust suffered what appeared to be an injury to his left arm or shoulder when he was checked into the boards Saturday night in Toronto. ... Montreal defenseman Raphael Diaz skated with his teammates earlier in the day for the first time in seven weeks. Diaz, who missed his 23rd game, has been sidelined since Feb. 25 because of a concussion. ... A moment of silence was observed prior to the game for victims of the Boston Marathon bombings.