The Rangers' Artemi Panarin celebrates his goal with Brendan Smith...

The Rangers' Artemi Panarin celebrates his goal with Brendan Smith during the third period of an NHL game against the Capitals on Tuesday at Madison Square Garden. Credit: AP/Al Bello

If the Rangers are to make a run at a playoff spot there is no more time for encouraging efforts that end up as losses, as happened on Sunday, when the Rangers last played the Washington Capitals.

So on Tuesday, when the Blueshirts entered the third period at Madison Square Garden trailing by a goal against these same Capitals, the Rangers simply had to find a way to win.

Artemi Panarin created two goals in the third period and scored another as the Rangers came from behind to cool off the red-hot Capitals, 5-2, snapping their losing streak at two games and keeping their playoff dreams alive for another day.

"So big,’’ Kaapo Kakko said when asked how important the victory was for the Rangers. "Washington is a good team, and we need some points right now. So big, big win for us.’’

Pretty goals by Kakko and Adam Fox pulled the Rangers out of a 2-1 deficit and into the lead, and then Panarin scored on a breakaway and Pavel Buchnevich scored shorthanded into an empty net to close it out.

With the win, the Rangers (16-15-4) remained five points back of the Boston Bruins for the fourth and final playoff spot in the East Division, following Boston’s 5-4 overtime win over New Jersey. The Rangers now go back on the road for two games in Buffalo Thursday and Saturday against the sad-sack Sabres.

Before the game, Rangers defenseman Brendan Smith admitted the Rangers have been doing a fair amount of scoreboard watching all season, and they were well aware of the gravity of their situation as far as the playoff chase is concerned.

"You start kind of figuring out and doing a little bit of the math of where, how many points you need to kind of keep in the playoff race,’’ Smith said.

Igor Shesterkin started in goal for the Rangers, and, with the way things went at the beginning, the 25-year-old Russian needed to come up huge to keep his team in this one.

Washington took the first nine shots of the game, and scored the first two goals, one by T.J. Oshie on a power play, at 2:23 of the first period — the first power play goal by the Caps in six games against the Rangers this season — and the second by Nic Dowd who jammed one on a goalmouth scramble at 4:21 to make it 2-0.

But Shesterkin (30 saves) dug in and didn’t allow the Capitals anything else. He kept his team in the game until it could find its footing.

"I just did my job,’’ Shesterkin said through interpreter Nick Bobrov, the Rangers’ Director of European Scouting. "After the first two goals, I removed myself from that moment, and continued to do my job, shot by shot, save by save.’’

Eventually, Filip Chytil got the Blueshirts on the board with a brilliant individual effort when he took the puck away from Washington defenseman Dmitry Orlov at the Rangers blue line, skated in on a breakaway, and beat Caps goalie Vitek Vanecek with a forehand shot at 15:36.

After a scoreless second period, Panarin ignited the Rangers comeback when he intercepted a pass from Zdeno Chara at the Rangers blue line and on the ensuing rush, passed cross-ice to Ryan Strome, and a Strome centered to Kakko for a tap-in goal that made it 2-2 at 4:10.

Panarin then helped set up Fox’s goal when he kept a loose puck from exiting the Capitals’ zone and sent a blind backhand pass to the right for the onrushing Fox, who kicked the puck up to his stick, then flicked a backhand shot over Vanecek’s left shoulder for his fourth goal of the season. The goal extended Fox’s point-scoring streak to eight games. Strome’s assist on the Kakko goal extended his scoring streak to 10 games.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME