BOSTON -- Elias Lindholm and Cole Koepke each had a goal and two assists for the Boston Bruins in a 6-4 win against the Montreal Canadiens at TD Garden on Thursday.

Mark Kastelic scored twice, David Pastrnak had a goal and an assist, and Nikita Zadorov and Brandon Carlo each had two assists for Boston (1-1-0).

The Bruins’ fourth line of Koepke, Kastelic and John Beecher (one assist) combined for six points, which Koepke credited to their pace.

“It’s something that we think our line can utilize well,” Koepke said. “Just to get it in deep, skate fast and kind of wear them down. Good things will happen when you play the game the right way, and [the] puck was on our side tonight.”

Jeremy Swayman made 20 saves after missing all of preseason and the season opener over contract negotiations that led to an eight-year, $66 million contract signed Oct. 6.

“It’s such an incredible thing to be back playing and in this building again,” Swayman said. “It’s a boatload of gratitude just knowing how much time I spent away from the rink, and I couldn’t be happier being back in the rhythm of things.”

Brendan Gallagher scored twice, and Joel Armia, Lane Hutson and Kaiden Guhle each had two assists for Montreal (1-1-0). Cayden Primeau made 23 saves, and Oliver Kapanen had an assist in his NHL debut.

“This is a team that was waiting for this game,” Canadiens coach Martin St. Louis said. “And they were just playing it simple, better than us tonight for 60 minutes. We had moments, but it wasn’t enough.”

Gallagher gave the Canadiens a 1-0 lead at 8:26 of the first period with a power-play goal, redirecting Armia’s shot from the top of the left circle past Swayman.

Charlie McAvoy tied it 1-1 at 11:04 with a wrist shot from the high slot on the power play.

Cole Caufield put Montreal ahead 2-1 at 12:18 with a tap-in at the left post off a seam pass from Guhle at the right point.

Kastelic tied it 2-2 at 13:24 with a wrist shot from the top of the left circle.

Lindholm gave the Bruins a 3-2 lead at 18:23, redirecting Zadorov’s shot from the point past Primeau. It marked Lindholm’s first goal for Boston -- and Zadorov’s second assist -- after each signed long-term contracts with the Bruins when free agency opened on July 1.

“I was just trying to open myself up in the high slot, and obviously we had eye contact there, so I kind of knew [Zadorov] was trying to go for [a] shot-pass there,” Lindholm said. “So, it was a great play by him, a heads-up play, and yeah, it was nice to see it go in.”

Pastrnak made it 4-2 at 15:56 of the second period with a one-timer from the slot, and Koepke pushed it to 5-2 at 16:51 when he stuffed in Beecher’s net-front attempt.

“We kind of shot ourselves in the foot there in the second,” Canadiens captain Nick Suzuki said. “We give up a few goals that we definitely want back, and structure-wise, we can’t make those mistakes. So yeah, [we] dug ourselves too big a hole.”

MTL@BOS: Pastrnak increases Bruins' lead in 2nd period

Josh Anderson cut it to 5-3 at 9:05 with a redirection in front.

Gallagher brought Montreal within 5-4 at 15:43 with a one-timer from the slot.

“You’re down. You have nothing to lose here. You’re pretty much throwing everything at him,” Gallagher said. “It was too late at that point, obviously.”

Kastelic banked the puck off Primeau’s pads from below the goal line 17 seconds later for the 6-4 final.

“I think we can see what kind of team we can be,” Bruins coach Jim Montgomery said. “We got to become a better checking team and understand game management a little better. I think that our game management was exemplary in the third [period]. But it’s hard to win in this League. We got our first win, we just keep building.”

NOTES: The Bruins extended their point streak against the Canadiens to 15 games, dating back to Nov. 26, 2019. It’s the longest active streak against one franchise … Swayman (133 games) became the second-fastest U.S.-born goaltender in NHL history to reach 80 career wins, behind only Frank Brimsek (123 games).