MONTREAL — The Canadiens were eventually going to win again, and it came at the Islanders’ expense.

Phillip Danault, Brendan Gallagher and Shea Weber each had a goal and an assist, and the Montreal Canadiens beat the New York Islanders 4-2 Tuesday night to snap an eight-game losing streak.

With some of the franchise’s greatest players in attendance, the Canadiens had some extra motivation to avoid matching their longest losing streak in about 80 years.

Eleven former captains, including Yvan Cournoyer, Serge Savard, Chris Chelios and Saku Koivu, were on hand at Bell Centre to commemorate the franchise’s 110th anniversary.

“I can’t say enough how neat that was,” said Weber, the current captain who sealed the win with an empty-netter. “There’s so much history in this franchise. To have the captains here, their presence, them giving back to the team, it was really cool.

“I hope it doesn’t take that every night for us to win games. But it definitely helped. Everybody in here had a boost, especially the way things were going. It was a good thing for us to be a part of that and use that.”

Jeff Petry also scored and Carey Price stopped 21 shots to earn his 11th win of the season for Montreal, which ended an 0-5-3 skid.

Scott Mayfield and Mat Barzal scored in the third period for the Islanders, and Thomas Greiss finished with 36 saves.

Carey Price stops a Leo Komarov shot for one of his 21 saves.
Carey Price stops a Leo Komarov shot for one of his 21 saves.AP

The Canadiens seemed determined to snap the losing streak as they came out with a fast and physical game right from the get-go.

Greiss turned away early chances by Gallagher and Nate Thompson before Danault scored in the last second of the first. With time ticking away as he crossed the blue line, Danault fired a shot off Mayfield, kicked the loose puck onto his stick and beat Greiss. It was Danault’s first goal since Nov. 15 at Washington — Montreal’s last victory before the skid.

The Canadiens team kept pushing in the second period with good pace, big hits and quality scoring chances.

That effort paid off when Gallagher doubled the lead with 6 1/2 minutes left after batting down a one-timer from Weber in the crease for the easy tap-in for his team-leading 11th of the season.

Montreal made it 3-0 at 2:12 of the third on Petry’s shot from the blue line, which deflected off forward Josh Bailey.

The Islanders remained in the game by getting on the scoreboard just 41 seconds later as Mayfield’s one-timer came off a bouncing puck that knuckled past Price.

Barzal then cut the deficit to 3-2 with 2:29 remaining by deflecting Nick Leddy’s shot from the point.

“We were down by two so we had to fight a bit,” said Barzal, who leads the Islanders with 24 points. “There were definitely some chances to be had out there. At the end of the day, it’s a 60-minute game and they dominated probably 50 minutes of it.

“They have some quick forwards and some big D-men and we just couldn’t find a breakout, couldn’t get anything through the neutral zone. They did a good job clogging it up.”

Weber’s empty-netter with 27 seconds left sealed the win.