NEW YORK (AP) — Joel Armia had three goals and the Montreal Canadiens beat the New York Rangers 4-2 on Friday night.

Brendan Gallagher also scored and Carey Price stopped 28 shots for Montreal, which has won four of six. The Canadiens, who hold the first wild-card spot in the Eastern Conference playoff race, pulled five points behind Toronto for third place in the Atlantic Division.

Vladislav Namestnikov and Brendan Lemieux scored, and Henrik Lundqvist finished with 32 saves as the Rangers lost their third straight and fourth in five games (1-2-2). Brady Skjei had two assists.

Armia pushed Montreal’s lead to 3-1 when he brought the puck up the right side and beat Lundqvist with a wrist shot 4:29 into the third period.

Lemieux, playing his second game with the Rangers since arriving from Winnipeg in a trade for Kevin Hayes, pulled them within one when Skjei’s pass went off Jesper Fast’s skate and Lemieux’s stick with 2:32 to go. It was his 10th of the season and first with New York.

Armia got his 10th of the season to complete his first career hat trick on an empty-netter with 36.7 seconds to go.

Trailing 1-0 after the first, the Canadiens went ahead with two goals in the middle period while sending 18 shots at Lundqvist.

Gallagher tied the score with his 28th, deflecting a centering pass from Tomas Tatar up high over Lundqvist’s shoulder at 7:27. Gallagher has five goals in his last five games.

The Canadiens took the lead with the help of a fortuitous bounce with 5:22 left in the period. Montreal defenseman Christian Folin sent a dump-in pass from the left side that rebounded off the end boards. Lundqvist got a piece of the puck, but it came out in front and Armia knocked it in before the diving goalie could stop it.

Tatar nearly added to the lead, but Lundqvist turned away his breakaway attempt with 3 1/2 minutes to go in the second.

The Canadiens outshot the Rangers 11-9 in the first but trailed after 20 minutes.

Namestnikov got the Rangers on the board, deflecting a pass from Skjei past Price for his ninth 4:41 into the game. Namestnikov has five goals and eight points in the last eight games.

Namestnikov also had several other scoring chances in the first period but was denied on an attempt in front with less than seven minutes remaining and then again about four minutes later. Price also stopped his wraparound try in the final minute.

NOTES: Gallagher has eight goals and 11 points in his last 12 games. … Armia had his second multigoal game of the season. The other was at Columbus on Jan. 18. … The Canadiens took two of three in the season series, also winning 5-2 at home on Dec. 1. The Rangers won the first meeting, 5-3 at Madison Square Garden on Nov. 6. … D Libor Hajek made his NHL debut for the Rangers one day after being called up from Hartford of the AHL. The 21-year-old, acquired with Namestnikov from Tampa Bay at last season’s trade deadline in the deal that sent D Ryan McDonagh and forward J.T. Miller to the Lightning, had five assists and 36 penalty minutes in 58 games with the Wolf Pack. Hajek was paired with Neal Pionk. … New York D Brendan Smith played right wing on a line with C Boo Nieves and LW Connor Brickley to start the game.

UP NEXT

Canadiens: Host the Pittsburgh Penguins on Saturday night before a three-game California trip.

Rangers: Host the Washington Capitals on Sunday to complete a three-game homestand.

(© Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)