BUFFALO, N.Y. --  Michael Pezzetta scored the decisive shootout goal and the Montreal Canadiens avoided playoff elimination by rallying to a 4-3 win over the Buffalo Sabres on Monday night.

Brendan Gallagher forced overtime by scoring his 200th career goal in capping a 3-on-2 rush with a shot from the right circle 8:35 into the third period. Jordan Harris and Alex Belzile also scored for Montreal, and Jake Allen stopped 30 shots through overtime, while allowing one goal on six shootout attempts.

Montreal would have been eliminated from playoff contention for a second straight season — and two years removed from reaching the Stanley Cup Final — with any type of loss.

Lukas Rousek scored a goal and added an assist in his NHL debut for Buffalo, which dropped to 3-6-3 in its past 12 and blew a chance to move to within four points of the idle Pittsburgh Penguins, who hold the eighth and final playoff spot.

Defenseman Riley Stillman and JJ Peterka also scored for Buffalo, while Eric Comrie stopped 38 shots through overtime, and allowed two goals on six shootout attempts.

Pezzetta scored by driving in from the right circle to beat Comrie inside the far post. Buffalo’s Jack Quinn scored in the fourth shootout round, but was matched by Montreal’s Jesse Ylonen, whose shot from in tight managed to trickle in through Comrie.

Montreal blew two one-goal leads to fall behind 3-2 on Stillman’s goal at the 8:31 mark of the second period.

Gallagher scored on the fly by using Sabres defenseman Rasmus Dahlin as a screen to snap in a shot inside the far left post. With the goal, Gallagher tied Bobby Rousseau for 24th on the Canadiens career scoring list.

DEBUT

Rousek, who tied the game at 1, was filling in for Sabres leading-scorer Tage Thompson, who is day to day with an upper body injury. The 2019 sixth-round draft pick became Buffalo’s 27th player to score in his first NHL game, and first since Ethan Prow did so on Dec. 29, 2021, against New Jersey.

With an assist on Stillman’s goal, Rousek became Buffalo’s first player to score and earn at least two points in his NHL debut since Maxim Afinogenov had a goal and assist on Nov. 10, 1999, against Boston.

PRIDE NIGHT

The Sabres hosted their third Pride Night, with Russian D Ilya Lyubushkin electing not to participate in warmups by citing an anti-gay Kremlin law and fears of retribution at home in Moscow, where he has family and visits in the offseason. The remainder of the team wore dark blue jerseys with the Sabres logo on the front encircled by a rainbow-colored outline.

During the first intermission, the Sabres broadcast a video in which GM Kevyn Adams said: “This is about recognizing someone’s humanity and true identity. We know there are people out there struggling with who they are, and we want them to know that they have an ally in the Buffalo Sabres.”

UP NEXT

Canadiens: At the Philadelphia Flyers on Tuesday night.

Sabres: Host the New York Rangers on Friday night.