Rangers left wing Artemi Panarin celebrates after his winning goal with...

Rangers left wing Artemi Panarin celebrates after his winning goal with defenseman Adam Fox in the overtime period of an NHL game against the Sabres on Saturday in Buffalo, N.Y. Credit: AP/Jeffrey T. Barnes

BUFFALO — Maybe it’s a chemistry thing. Maybe the Rangers are still trying to figure out how to jell as a team after adding Patrick Kane 10 days ago. But something isn’t quite right with the Blueshirts at the moment. They’re searching for something.

But at least they are getting wins.

They got their second straight post-regulation win Saturday, beating the Buffalo Sabres, 2-1, in overtime at KeyBank Center when Artemi Panarin scored a power-play goal with 2:58 left.

Panarin buried the rebound of a shot by Adam Fox that was deflected right to him to give the Rangers their second win on the road trip

. They got the power play when Sabres defenseman Rasmus Dahlin hooked Mika Zibanejad.

“We say it a lot when we have games like this; we know we’ve got better [in us] . . . you take the two points but, you know, we’re getting to that point where we got to start putting it together, figure it out,’’ Fox said.

“Obviously, there are some new guys that people are starting to try and click with, everything like that, but yeah, it wasn’t the prettiest this game. But I’ll take the two points, and we’ve got a quick turnaround tomorrow to get things straight.’’

The Rangers (37-19-9) will close out the three-game road trip Sunday against the Penguins.

Goaltender Igor Shesterkin was the biggest star for the Rangers, turning aside 32 of 33 shots he faced, including two in the final minute of regulation — one from J.J. Peterka with 42 seconds remaining and one from a wide-open Dylan Cozens with 38 seconds left — to get the Rangers into overtime.

“Shesty was the key in the hockey game and the difference for us,’’ coach Gerard Gallant said. “He was outstanding tonight, and that’s a good sign.’’

Gallant, who Friday had said he hoped he wouldn’t have to change his forward lines, did just that in the third period, breaking up the Panarin-Kane combination and breaking up the line of Alexis Lafreniere, Filip Chytil and Kaapo Kakko. He went to a first line of Panarin, Zibanejad and Vladimir Tarasenko, a second line of Chris Kreider, Vincent Trocheck and Kakko, and a third line of Lafreniere, Chytil and Kane.

“I’ve done it for a year-and-a-half, and we’ve had a pretty good team,’’ Gallant said of his penchant for mixing up lines. “I’m going to do what’s working, and we tried it, and it worked tonight. Maybe we’ll try it again tomorrow.’’

It seemed to put some life into the Rangers in the third period, at least, after a listless second in which they were outshot 12-4 and outchanced 9-1 at five-on-five, according to Natural Stat Trick.

“Yeah, in the third it was a lot better, I thought,’’ Gallant said of the new lines, “until the last minute-and-a-half, when [Buffalo] had about four great chances. But overall, I thought it was a little bit better.’’

The Rangers started off looking very much like the better team as they dominated possession in the early part of the first period and ran out to a 5-1 edge in shots on goal. But at some point, the momentum shifted, the Sabres took over, and it felt as if the visitors were lucky to escape the first period tied 0-0.

Buffalo took a 1-0 lead on Jeff Skinner’s 29th goal of the season, a one-timer from the right-wing circle off a pass from Ilya Lyubushkin.

Kane, a Buffalo native, tied it for the Rangers at 11:28 on a lucky bounce as his backhand centering attempt from the bottom of the right circle hit the skate of Sabres defenseman Owen Power and deflected in past Ukko-Pekka Luukkonen (24 saves).

It was Kane’s second goal as a Ranger and second in two games.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME