Rangers players celebrate a goal by Jimmy Vesey (26) in...

Rangers players celebrate a goal by Jimmy Vesey (26) in the second period of an NHL hockey game against the Florida Panthers at Madison Square Garden on Monday, Jan. 23, 2023. Credit: Kathleen Malone-Van Dyke

Rangers coach Gerard Gallant gets questioned a lot about how often he changes his team’s forward lines. He switched the lines again for Monday night’s game at the Garden against the Florida Panthers, and everything seemed to work out perfectly.

Gallant sent four new lines out against the Panthers and three of them produced goals, including two by Mika Zibanejad, as the Rangers beat the Panthers, 6-2.

Afterward, Gallant didn’t sound as if his team won.

“I wasn’t overly happy most of the night, to be honest with you,’’ he said. “But things ended up . . . it’s a win.

“But I just didn’t think we played well enough. We got some breaks [and we] got some puck luck tonight. But our game wasn’t real good.’’

Igor Shesterkin made 33 saves and was especially good in the second period, stopping 14 shots and keeping the Rangers (26-14-7) in the game until they broke out with four goals in the final 25 minutes.

Shesterkin also came within inches of scoring his first NHL goal when he fired a shot down ice with about five minutes left that just missed the left goalpost of an empty net.

Asked if he thought his shot was going to go in, Shesterkin said, “Yeah, why not?’’

It didn’t, but Filip Chytil got an empty-net goal with 3:11 left to make it 6-2.

Zibanejad’s first goal, which was the 250th of his career, came on the power play and broke a 1-for-22 skid with the man advantage.

Florida (23-21-5) entered the game 7-2-1 in its last 10, but the Rangers went ahead when Adam Fox (one goal, two assists) made a nifty reception of a blind pass by Artemi Panarin (three assists) in the neutral zone, skated in on a breakaway and beat Alex Lyon with a backhander for his 10th goal of the season at 3:03 of the first period.

The Panthers tied the score on a power-play goal by Carter Verhaeghe at 5:56 of the period after the Rangers were penalized for having too many men on the ice.

The Rangers were being outshot 6-1 with a little more than six minutes left in the period, but Zibanejad’s power-play goal at 17:21 — he blasted home a one-timer from his usual left-circle spot off a pass from Panarin — put them back in front.

The Rangers didn’t seem to get any momentum from the goal, though. Florida peppered the Rangers’ net with shots, and only some fine work by Shesterkin kept the lead intact until Jimmy Vesey — part of a new second line with Vincent Trocheck and Barclay Goodrow — scored to put the Rangers up 3-1 at 15:03 of the second period.

Trocheck won a draw in the right circle and Vesey fired a shot that was blocked. Trocheck got a rebound shot off that Lyon kicked out, but Goodrow got the puck below the goal line and fired it off Lyon’s back. The goalie tried to lie flat and cover the puck, but Vesey drove to the net and jammed it in for his eighth goal.

The reunited Kid Line of Kaapo Kakko, Chytil and Alexis Lafreniere made it 4-1 at 7:56 of the third. Lafreniere jammed in the rebound of a shot by Kakko for his first goal since Dec. 7, breaking a 17-game drought.

Zibanejad scored his second of the game 14 seconds later, taking a pass from Panarin and whipping it past Lyon at 8:10. At that point, the Rangers could breathe.

“I mean, you score two goals in a matter of seconds, it’s going to . . . give you a little bit of a cushion,’’ Fox said.

Florida coach Paul Maurice pulled his goalie with little more than nine minutes to go, and Aleksander Barkov scored to make it 5-2 at 11:02.

More Rangers

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME