NEW YORK — The Montreal Canadiens are hoping their season is back on track.

After suffering eight straight losses, Friday night's 2-1 win over the New York Rangers gave Montreal two victories in their last three games, and something to build on.

Nate Thompson scored the winner with 67 seconds left in the third period. Leading a Canadiens break, Nick Cousins had a shot blocked but found the 35-year-old veteran to set up his first goal since Nov. 9. The Montreal bench jumped to their feet in celebration.

"We wanted to go after them," Thompson said. "They made a push. We just found a way and Carey made big saves in key moments."

Carey Price made 29 saves and improved to 7-2-0 in his last nine games at Madison Square Garden. Brendan Gallagher also scored for the Canadiens. The win lifts Montreal into second place in the Atlantic Division.

"We are playing better on our side of the puck" Price said. "It's all about commitment and we have to stick with that. It's baby steps. Right now, we just have to focus on the next one."

Brendan Smith scored for the Rangers. Alexandar Georgiev made 31 saves in his second straight start in place of Henrik Lundqvist, who was feeling under the weather. He started on back-to-back nights for just the fourth time in his career.

The loss was the Rangers' 17th in their last 23 games against the Canadiens since the start of 2013.

"It was two teams that looked like they played last night," David Quinn said. "Unfortunately we were the first team to blink, 59 minutes into the game."

When the teams met in Montreal on Nov. 23, they played an instant classic. The Canadiens led 4-0 before the Rangers stormed back to win 6-5. There was far less scoring Friday night. Smith tied the game at 1-all early in the second period, capitalizing on a turnover by Otto Leskinen and scoring on a breakaway. Leskinen was playing in just his second career game, having made his NHL debut the previous night. Montreal's penalty kill, which entered the night ranked 29th in the league at 75%, killed off two penalties committed by Ben Chiarot in the final seven minutes of the second period.

"We played a solid road game," Claude Julien said. "The Rangers are a good transition team and we made adjustments. The guys did what they had to do. It was a hard-fought game."

The teams exchanged chances in the opening five minutes, with the best opportunity falling to Mika Zibanejad, whose shot from the left wing was saved by Price. Gallagher scored the game's first goal a little more than halfway through the first period, with Phillip Danault and Tomas Tatar earning assists. Gallagher has scored in three straight games.

"We came here with urgency," Tatar said. "Every line chipped in. We played a good game. It was a huge game for us."

The Rangers nearly tied the game less than 30 seconds later, as Shea Weber blocked Ryan Strome's shot. Weber was bloodied after the puck hit him in the mouth, but remained in the game.

NOTES: Jesperi Kotkaniemi didn't play after suffering a concussion Thursday night against the Avalanche. He was replaced by Charles Hudon. ... Marc Staal played for the first time since suffering an ankle injury on Nov. 7. Staal took the spot of Libor Hajek, who is expected to miss 3-to-4 weeks after sustaining a sprained knee during Thursday night's game in Columbus. ... The Rangers scratched Micheal Haley. ... The Canadiens scratched Mike Reilly and Christian Folin. ... New York assigned Boo Nieves to the Hartford Wolf Pack of the American Hockey League on Friday.

UP NEXT:

Canadiens: At Pittsburgh Penguins on Tuesday night.

Rangers: Open a four-game trip at Vegas on Sunday.