Mika Zibanejad of the Rangers fights for the puck with...

Mika Zibanejad of the Rangers fights for the puck with Simon Edvinsson (77) in first period play against the Detroit Red WIngs at Madison Square Garden. October 14, 2024. Credit: Ed Quinn

Coming off a sloppy overtime loss to the Utah Hockey Club on Saturday, the Rangers needed to clean up their act in Monday night’s game against the Red Wings at the Garden.

They did, and a number of things fell into place that had to be reassuring for Peter Laviolette, beginning with an excellent bounce-back performance by goaltender Igor Shesterkin, the first goal in a Rangers jersey by newcomer Reilly Smith and the first points — a goal and two assists — from Mika Zibanejad in a tidy 4-1 victory over Detroit.

The teams will play each other again on Thursday night in Detroit when the Rangers start a three-game trip.

“Last game [a 6-5 loss to Utah] was like a nightmare,’’ Shesterkin said. “ we did a great job. Not too many two-on-ones , so we get the two points. It’s important for us. We just need to play that same way.’’

Shesterkin, who allowed six goals on 25 shots Saturday, made 31 saves against Detroit to earn his second win of the season.

“He was really good,’’ Laviolette said. “It was a really tough game to judge him last game. And I’ve said this before, but there’s times where I think we just do things that not a lot of goaltenders can make the saves that needed to be made last game. You might make one, but when you leave four or five of them out there, there’s going to be trouble coming at you. So I was glad to see that we got better right in front of him.’’

Smith, who was acquired in a trade with Pittsburgh over the summer, scored off a faceoff win by Zibanejad at 4:51 of the third period. It was an important insurance goal after Chris Kreider’s power-play goal late in the second period broke a 1-1 tie and gave the Rangers the lead.

Zibanejad added an empty-net goal with 1:22 left as all three members of the first line scored.

“I thought in Pittsburgh that line was really good,’’ Laviolette said. “And tonight they were productive . . . It’s nice to see Reilly get on the board and] just get production from different people. So tonight it was them.’’

Artemi Panarin, who had three assists, including one on Zibanejad’s goal, was asked if it was important to get Zibanejad a goal just for his confidence.

“It 100% helps, especially in the beginning of the year,’’ Panarin said. “You never feel like that when you miss a couple games in the middle of a season. It’s kind of not a big deal. But from the first game of the season], everyone wants to do something.

“I’m glad he scored tonight and got a couple assists. He was pretty good, too, before. Just tough luck, that’s all.’’

Alexis Lafreniere’s second goal of the season, a sweeping one-timer from the right wing faceoff dot off Panarin’s feed that Detroit goalie Alex Lyon probably would want to have back, opened the scoring at 11:45 of the first period. The Red Wings tied it at 1 when Dylan Larkin beat the buzzer to end the period, poking in a pass from Justin Holl with 1.1 seconds left.

The Red Wings had the better of possession and had the edge territorially for most of the second period until an energetic shift by the Will Cuylle-Filip Chytil-Kaapo Kakko line seemed to get the Rangers started with about five minutes to go.

A nifty tic-tac-toe sequence between Lafreniere, Panarin and Vincent Trocheck led to a great glove save by Lyon with 3:55 to go.

Fifty-eight seconds later, Holl was sent off for a high-sticking penalty against the Rangers’ 6-6 Adam Edstrom, and seven seconds into it, the Rangers cashed in. Zibanejad’s diagonal pass was expertly deflected in by Kreider at the back post for his third goal of the season, giving the Rangers a 2-1 lead at 17:05.

Notes & quotes: Adam Fox backhanded a shot between Lyon’s pads a split-second after time expired in the second period. The referees immediately waved it off . . . After playing in the home opener Saturday, Matt Rempe was scratched for the second time in three games. D Chad Ruhwedel was the other scratch . . . D Ryan Lindgren, who remains on injured reserve with an upper-body injury, took part in the morning skate wearing a regular full-contact jersey.