Igor Shesterkin #31 and Chris Kreider #20 of the Rangers defend...

Igor Shesterkin #31 and Chris Kreider #20 of the Rangers defend the net in the second period against Seth Jarvis #24 of the Carolina Hurricanes during Game Six of the Second Round of the Stanley Cup Playoffs at Madison Square Garden on Saturday, May 28, 2022. Credit: Jim McIsaac

These Rangers clearly are best with their backs against the wall.

On Saturday night, for the fourth time in these playoffs, they played a game in which a loss would have meant the end of their season. And for the fourth time, they came through with a victory.

Filip Chytil had two goals and Igor Shesterkin made 37 saves and had two assists as the Rangers beat the Carolina Hurricanes, 5-2, at Madison Square Garden in Game 6 of the teams’ second-round playoff series.

The Rangers forced a Game 7 on Monday night at PNC Arena in Raleigh, North Carolina.

“It didn’t surprise me,’’ coach Gerard Gallant said when asked about his team’s continued ability to capture must-win games in the postseason. “I knew we’d come out hard and play well . . . It was a competitive game. We jumped on them early [by taking a 2-0 lead], so that was key. But Shesty made some key saves in the first period to [help keep] it 2-0 for us.’’

Shesterkin stopped all 15 shots he faced in the first period, including a breakaway by Sebastian Aho and a shot by Teuvo Teravainen on the same sequence. Soon after, Tyler Motte picked up a loose puck inside the Rangers’ blue line, skated up the middle and scored the game’s first goal against Antti Raanta at 7:22 of the first period.

The sequence showed the difference between Shesterkin, the Hart Trophy finalist and presumptive winner of the Vezina Trophy, and Raanta, the former Rangers backup who has been playing in place of the injured Frederik Andersen.

Raanta was shaky and ended up being pulled after Chytil’s first goal gave the Rangers a 3-0 lead at 3:24 of the second period. He finished with three goals allowed on 13 shots.

The Rangers also won the battle of special teams, scoring two power-play goals in five opportunities and killing all three Carolina man advantages.

Mika Zibanejad’s power-play goal at 9:51 of the first period — on a harmless-looking wrist shot off the rush from the right circle — gave the Rangers a 2-0 lead. Shesterkin got his first assist of the game on that one when he left the puck for Adam Fox (two assists) and Fox passed it to Zibanejad in the neutral zone.

Former Rangers defenseman Brady Skjei scored his first goal of the playoffs to cut Carolina’s deficit to 3-1 at 5:05 of the second period.

But before the Hurricanes had a chance to get themselves back into the game, Chytil scored his second goal on a backhand shot over the stick- side shoulder of relief goalie Pyotr Kochetkov to make it 4-1 at 6:47 of the second period. Shesterkin got his second assist on that goal.

“It feels good,’’ said Chytil, who was back on a reunited Kid Line between wingers Alexis Lafreniere and Kaapo Kakko. “Even before that first goal . . . Laffy made a nice pass and I just missed the net, but I tried to keep shooting every time I got a chance . . . Of course I’m happy that I helped the team win the game.’’

The Rangers, bolstered by the return of injured forward Barclay Goodrow, had faced elimination three times in their first-round series against the Pittsburgh Penguins, falling behind 3-1 before rallying to win three straight games and advance to the second round.

“I just see the same thing every night,’’ Gallant said. “I go in there and have a little 30-second chat with them before the game. It’s the same thing. It’s just level, you know? Level. Get ready to play the game. Play fast, play hard, play smart.

“But they just respond all year long. We had a two-game losing streak [during the regular season] or something happened, and you knew the next day they’re going to come out and battle and win. And that’s what mostly happened.’’

Now, though, to advance to the Eastern Conference finals, they must face the challenge of having to win a game in Raleigh. Carolina has won all seven games it has played at home in the postseason (and lost all six it has played on the road). The Rangers are 0-3 in Raleigh in the series.

“We have to play how we play at home,’’ Chytil said. “I don’t know what’s different for us to play on the road, even with the first series. We found a way to win in Pittsburgh.’’

More Rangers