Rangers defenseman Jacob Trouba (8) clears the puck away from...

Rangers defenseman Jacob Trouba (8) clears the puck away from goaltender Jonathan Quick (32) after a shot by Detroit Red Wings right wing Jonatan Berggren (48) during the first period of an NHL hockey game Saturday, Nov. 9, 2024, in Detroit. Credit: AP/Duane Burleson

DETROIT — After a truly awful showing in their previous game Thursday, the Rangers were desperate for a bounce-back performance and a win on Saturday night.

But everything they’ve been struggling with during the past two weeks continued to be a problem. They had trouble getting the puck out of their zone, and when they did get it in the offensive zone, they couldn’t keep it there. And they were way too reliant on their goaltender.

Nevertheless, the Rangers somehow managed to slip out of Little Caesars Arena with a 4-0 victory despite being outshot 37-24. According to Natural Stat Trick, the scoring chances were 44-24 in favor of the Red Wings, including 16-8 of the high-danger variety.

“You know, we found a way to win, right?’’ said goalie Jonathan Quick, who made 37 saves in his first shutout of the season and 61st of his career. “They’re coming off a loss [in Toronto] last night; they came out with urgency. We were able to find a way to get that first [goal] and block shots when we needed to and take advantage of opportunities we got, especially during the second period.’’

This is the 17th consecutive season in which Quick, 38, has recorded a shutout.

“It’s the first I’m hearing of it,’’ he said when asked what that streak means to him. “So I didn’t really think about it. I guess it’s, you know, 17 years I’ve had a good team in front of me, right?’’

The Rangers (9-3-1) would have had no chance to win had it not been for Quick, who kept them in the game until they got goals 48 seconds apart by Jimmy Vesey and Artemi Panarin late in the second period to make it 3-0.

“It’s good to get two points and get the win, get back on track,’’ coach Peter Laviolette said. “I thought the third period was our best period. First period, we got going a little bit toward the end. I thought in the first period and the second period wasn’t very good .  .  . but overall, the bounce-back and getting a win is good.’’

Quick, who played the final 25:57 in relief of Igor Shesterkin in Thursday’s 6-1 loss to Buffalo, got his third start of the season and his second against the Red Wings on the road. He came under pressure on the game’s opening shift, as he was forced to spread out and make a stellar save on Alex DeBrincat only 21 seconds in.

That set the tone early. The Rangers were outshot 4-0 three shifts in and seemed on their heels most of the night.

“Yeah, I mean, there’s a good chance off the bat there, but they’re a talented team,’’ Quick said. “You know they’re gonna create, so you go in, opening draw, ready for what they’re gonna throw at you.’’

The Red Wings (6-7-1) had lost to the Maple Leafs, 3-1, on Friday night in Toronto and were starting goalie Ville Husso, who’d been called up from the minor leagues Thursday on an emergency basis because of an injury to Alex Lyon.

However, they were dominating play when Simon Edvinsson was called for a tripping penalty against Mika Zibanejad at 13:06 of the first period. Seven seconds later, Chris Kreider tipped in a shot by Adam Fox to make it 1-0.

The Rangers picked up their play after that and got out of the period with the lead intact but were absolutely suffocated in the second period, pinned in their own zone for most of it and unable to get the puck out consistently for the first 15 or 16 minutes.

They were outshot 19-8 in the period but survived a high-sticking penalty to Ryan Lindgren as Quick made three saves and Dylan Larkin hit the goalpost.

Shortly after that, the Rangers finally started to get the puck out of their zone and get some traction. The fourth line got them a goal when Sam Carrick fed a pass to the slot from behind the net that Vesey banged in for his first goal of the season at 16:52.

“We came out of our end, got through the neutral zone, a couple rims off a forecheck, and they lost coverage,’’ Vesey said of the play. “I was able to find myself alone and in front, and Sam made a great play. I just shot it as hard as I could.’’

On the next shift, Zibanejad came out from behind the net and sent a diagonal pass to Panarin in the right circle. He beat Husso at 17:40 for his 10th goal to extend the lead to 3-0.

They made it 4-0 when the Red Wings pulled Husso with 4:10 remaining and Reilly Smith scored into the empty net.