After the Canadiens took a 1-0 lead on Kirby Dach's power-play marker at 9:11 of the second period, Boston responded with a power-play tally of its own when Taylor Hall struck from the doorstep to knot things up with 5:48 to go in the middle frame.
The teams traded goals again midway through the third as David Krejci gave the B's a 2-1 lead at 9:45 of the period when he tipped home a Pastrnak shot from the high slot, before Dach notched his second of the game just 1:46 later.
"They definitely came out hard. It's a rivalry game, it's very easy to get motivated for the game," said Pastrnak, who registered a four-point night (goal, three assists). "These games it never matters who is in a playoff spot, if you're at the bottom of the standings or up top, you're always going to see a tight match and that's the type of game we played today.
"Every time you play Montreal - and I'm sure it's the same for Montreal when they play us - it's a special game. It's fun, no matter which building we play, either here or home. A lot of history. You will always get motivated to play and it's always gonna be a tight game. It does have a special feeling and it's a lot of fun."
The Bruins took the lead for good with just under three minutes to go when they worked a faceoff play to perfection. Bergeron won the draw back to Pastrnak, who cut across the left circle and fired a shot on Montreal goalie Samuel Montembault. After the rebound bounced by Brad Marchand, Bergeron swooped in and ripped home the go-ahead goal, marking his 79th career game-winner.
"We expected as a staff for us to get better significantly after the first and we did," said Montgomery. "That continues. We just have game breakers that can make unreal plays in big moments. That was a typical playoff goal that wins playoff games, [the] Bergeron goal…there's a lot of poise to our team and a huge belief that we will find a way.
"I think Patrice said, 'Never in doubt,' after the game and it's the way we feel. We feel if it's tied, we're gonna come out on top."