The Flyers, outscored by a ridiculous 17-3 margin in their previous two games against the New York Rangers, finally had some pushback Saturday afternoon against the Blueshirts.

Leading the way was Samuel Morin, the 6-foot-7, 230-pound defenseman who scored his first NHL goal and sparked a 2-1 Flyers victory over the Rangers at the Wells Fargo Center.

Recalled from the AHL’s Phantoms earlier in the week, Morin scored on a point blast with 4 minutes, 27 seconds remaining to snap a 1-1 tie and enable the Flyers to end a four-game losing streak.

» READ MORE: Who’s been on the ice for all those goals? The numbers behind the Flyers’ blowout losses to the Rangers

Michael Raffl set a screen in front on Morin’s game-winning drive, then joined his teammates in mobbing the likable defenseman, who has been a story of perseverance as he has overcome two knee surgeries and other injuries that caused him to miss most of three seasons.

“It was crazy. It’s been a long road for me,” Morin said. “Probably the best moment of my life.”

The Flyers moved ahead of the Rangers and into fifth place in the East Division.

The Flyers outshot the Rangers, 37-25, and had their forecheck working and had much better defensive gaps than in recent games against the Rangers.

Brian Elliott, who appears to be the Flyers’ new No. 1 goaltender, made 24 saves to register his first win in his last seven starts.

“Right from the get-go, I think our sticks were really good,” Elliott said. “We were blocking lanes and just had that good positioning. I think we’ve talked on it a lot, and we worked on it in practice.”

Because of a crowded schedule, Friday was the Flyers’ first full practice in 12 days.

“Just putting those things together, and guys coming back hard for each other, it makes it hard to make plays out there for the other team,” Elliott said, adding that in previous games opponents’ passes were “getting through.”

Rangers defenseman Jacob Trouba said the Flyers’ forecheck made a difference.

“They were on us on the D pretty hard, taking away the walls,” he said. “It was tough to really get a handle on the puck and make a good, quality breakout.”

Scott Laughton, sent in on a breakaway by Nic Aube-Kubel, had his backhander gloved by Igor Shesterkin (35 saves) with 14:24 left in regulation, keeping the score tied at 1.

The Rangers, who weren’t trailing only because of Shesterkin’s dominating performance, got a power play midway through the third, but the Flyers had a strong penalty kill and the game remained deadlocked.

Elliott kept it at 1-1 as he stopped Filip Chytil’s close-range shot with his mask with about 7½ minutes to go.

The Flyers had tied the game at 1-1 on Nolan Patrick’s second-period goal.

Patrick, who missed last season because of a migraine disorder, has played much better lately, but it hadn’t shown on the score sheet.

Until Saturday.

With three seconds left on a power play, Patrick redirected home Shayne Gostisbehere’s point shot to knot the score at 1 with 7:08 remaining in the second.

The goal came after a frustrating five-on-three power play, one in which the Flyers were reluctant to shoot and allowed the Rangers to make three clears.

But Gostisbehere made a deft move at the blue line to get free for a shot that Patrick tipped past Shesterkin while the Flyers were on a five-on-four power play.

It was Patrick’s first point in eight games, his first power-play point since opening night, and just his second goal in the last 26 contests.

The Rangers resembled the Harlem Globetrotters on skates in their previous two games against the Washington Generals, uh, Flyers.

There were no-look passes, slam-dunks in front of the net, wide-open one-timers, and a mind-boggling, basketball-like run — 15 straight goals over a two-game stretch.

Mika Zibanejad had another slam-dunk in Saturday’s first period, getting behind defenseman Phil Myers, taking a crossing feed from Ryan Strome, and jamming the puck into an open net. The Rangers were on a power play because of Travis Konecny’s roughing penalty against Zibanejad.

It gave Zibanejad 15 points (seven goals, eight assists) in six games this year against the Flyers. That equaled the most points ever scored by a Ranger against the Flyers in a season, matching Jaromir Jagr in 2005-06 (9-6 in eight games).

In his last three games against the Flyers, Zibanejad has seven goals and 13 points. He has 15 of his 27 points this season against the Flyers.

But Morin took the spotlight away from him as the Flyers ended their longest losing streak since midway through last season.

“That was a hungry and desperate team, obviously,” Zibanejad said about the Flyers.