Alexis Lafreniere #13 of the New York Rangers celebrates his...

Alexis Lafreniere #13 of the New York Rangers celebrates his first period goal against the Washington Capitals with teammate Vincent Trocheck #16 at Madison Square Garden on Sunday, Jan. 14, 2024 in New York City. Credit: Jim McIsaac

After the Rangers blew a third-period lead Saturday in Washington and lost in stunning fashion in the front end of this weekend home-and-home, coach Peter Laviolette more or less declared Sunday’s matinee game against the Capitals at Madison Square Garden a must-win.

And by the narrowest of margins, they did it, riding first-period goals by Artemi Panarin and Alexis Lafreniere to a 2-1 victory that ended their losing streak at four games.

“Nobody wants to lose hockey games, you know what I mean?’’ Laviolette said. “You lose one, you want to get the next one. You lose two, you want to get the next one. And so when that [losing streak] mounts a little bit, I think the urgency grows.’’

Rangers goaltender Igor Shesterkin, who had allowed 16 goals in his most recent four starts, stopped 24 of 25 shots to raise his record to 17-10-0. Washington goalie Charlie Lindgren (8-4-3), who entered 2-0 against the Rangers, again got the start after playing in the Capitals’ 3-2 win on Saturday and stopped 29 of 31 shots.

Playing their 42nd game of the season — the first game of the second half — the Rangers buckled down defensively, determined not to allow the types of odd-man rushes they have been giving up throughout their slump.

Though the Rangers for the most part have outshot their opponents recently and limited the number of scoring chances allowed, the quality of the chances they’d been allowing was too good, they believe. And it’s put too much pressure on their goaltenders.

“I think in the aspect of when we give up chances, they’re big chances,’’ said Rangers defenseman Ryan Lindgren, the brother of Charlie Lindgren. “They’re breakaways, they’re two-on-ones, and that’s tough for a goalie. It didn’t seem like we were giving up a whole lot of shots, but when [opposing teams] were getting their opportunities, they were Grade A. And I think we did a better job of that tonight.’’

Although Shesterkin didn’t make any unbelievable saves on Sunday, he made all the ones he needed to, including a save before the final horn against Evgeny Kuznetsov after the Capitals won a faceoff.

“I think it was important for Igor to give us a good game, and I thought he did,’’ Laviolette said. “I thought we did a better job in front of him tonight than maybe his last start. I don’t think we did a very good job; we could have tightened some things up.

“At the end of the day, they still have good players on the team and they’re going to get scoring chances,’’ Laviolette said. “And he made big saves . . . at the right time. We needed to get a win tonight and just kind of put that behind us and start to build something new.’’

The Metropolitan Division-leading Rangers (27-13-2) moved three points ahead of the second-place Hurricanes. The Capitals are 20-15-6.

The Rangers got a boost to their lineup with the return of forward Kaapo Kakko, who missed 21 games with a lower-body injury, and Panarin gave them the early lead, scoring his 27th goal 50 seconds into the game off the rush on a nice feed from Vincent Trocheck.

The goal was Panarin’s 400th point as a Ranger. He did it in 310 games, faster than anyone else in franchise history.

The Rangers made it 2-0 on a goal by Lafreniere, Panarin’s linemate, who banged in his own rebound for his 11th goal with 49.9 seconds left in the first period.

“I’ve had good looks lately, but I couldn’t really score,’’ Lafreniere said. “Today was good. I got my own rebound, so it was good.’’

Washington’s T.J. Oshie, who was a force in front of the Rangers’ net the whole weekend, scored his fourth goal of the season (and second of the weekend) at 11:03 of the second period to pull Washington within 2-1.

But the Rangers held on the rest of the way, even if their power play went 0-for-5 and they never could get an insurance goal. They found a way to win, which is something they hadn’t been doing lately.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME