MONTREAL -- The Montreal Canadiens stopped their longest slide of the season just in time to avoid dropping out of the Northeast Division lead.
Mike Cammalleri scored on a penalty shot 1:04 in. Maxim Lapierre and Brian Gionta also scored and Carey Price stopped 34 shots for the Canadiens, who remained in first place in the Northeast with 40 points.
"That's a big game," said Price, who got his league-leading 18th win. "Those games are obviously four-point games. We're tied if they win that one -- they actually move ahead of us -- so that was one that we really needed."
Boston's Marc Savard had a goal and an assist, and Patrice Bergeron got his second assist of the game on Milan Lucic's goal with 4:50 left in the third. Blake Wheeler also scored and Tim Thomas made 37 saves for the Bruins, who now trail the Canadiens by four points.
"We dug ourselves a hole again and tried to claw out of it but it's tough to continue to claw out of those holes each and every night," Wheeler said.
Pacioretty, who made his season debut in Wednesday night's loss to Philadelphia, put Montreal up 3-1 with his first goal in over a year with 30 seconds left in the first. Gomez got his first of two assists when Pacioretty's backhand made its way in for his first goal since Nov. 25, 2009, ending a personal 28-game goal drought.
Pacioretty and Gomez both assisted on linemate Gionta's goal late in the second. The Canadiens' captain got his 11th at 16:54 to give Montreal its third two-goal lead at 4-2.
Savard scored his first goal in seven games in the second and assisted on Bergeron's power-play goal 15:10 into the third to draw Boston within one for the third time in the game.
The Canadiens had not lost more than two games in a row prior to their losing streak.
Gomez had two assists for a second night in a row after missing Montreal's two previous games because of a lower-body injury. He had nine points in 28 games before his injury.
The 21,273 on hand at the Bell Centre cheered their approval when referee Bill McCreary pointed to the center-ice faceoff circle after Cammalleri was hooked by Bruins captain Zdeno Chara on a breakaway just over a minute in.
Thomas moved aggressively around the goalmouth as Cammalleri skated in on the penalty shot. The Canadiens' left wing deked and fired a shot over Thomas' outstretched right pad for his 11th goal, touching off an even larger roar from the sellout crowd.
"I kind of looked up and saw him doing it and the first thought I had was, 'Don't change your shot because of him, just stick to what you want to do here and get him moving,'" Cammalleri said. "I think he was probably playing some mind games or something. Maybe next time I'll snap it from center ice."
Lapierre made it 2-0 with his fifth at 6:24 on a shot off the right post that went in off Thomas.
Wheeler cut the lead to 2-1 at 15:52 with a shot from the right edge of the goalmouth that trickled down Price's pad and just made it across the goal line.
Canadiens defenseman P.K. Subban brought the crowd to life again later in the period. The Montreal rookie backed into a solid open-ice hit on Brad Marchand, drawing the ire of several of the Bruins, including Gregory Campbell, who drew a roughing minor, the only penalty on the play.
"They're trying to send a message that, 'Hey, you're not going to be able to just walk all over us,' and I'm fine with that," Subban said. "At that point I didn't really want to fight, our team wasn't in a position where we needed that, so I just tried to stay in the game and tried to force him to do something.
"We drew a penalty out of it and we ended up scoring on the power play so that's the type of game I want to play, just in-your-face and hopefully something good comes out of it."
Bruins coach Claude Julien was exasperated about being asked about his players' reaction to the hit.
"That's the question that everybody asks every time there's a good hit," Bruins coach Claude Julien said. "Every team seems to want to go and defend their teammate nowadays with clean hits, that's all over the league."
Savard drew Boston within one once again 6:54 into the second when he deflected Andrew Ference's shot past Price to make it 3-2.
An unlikely fight pairing midway through the second saw Bruins center David Krejci and Cammalleri drop the gloves and go at it. Krejci had three minor penalties in his 22 previous games this season. ... D Yannick Weber and C Tom Pyatt did not dress for Montreal.