The Flyers and New York Rangers are short on motivation because they are both on the verge of falling out of the East Division playoff race, so it wasn’t surprising that the teams muddled through a relatively sloppy game Friday at Madison Square Garden.

The Rangers, getting 26 saves from Alexandar Georgiev, made fewer mistakes than the Flyers as they registered a 4-1 win.

Mika Zibanejad, Artemi Panarin, Pavel Buchnevich and Alexis Lafrenière each had two points for the Rangers.

The Rangers, who have eight games left, moved to within six points of Boston for the final East Division playoff spot. The Bruins, upset by Buffalo on Friday, have two games in hand.

The Flyers are in a serious scoring drought. They have averaged about two goals in their last 19 games. Before that, they averaged 3.3 goals in their first 28 games.

“A lack of confidence,” Scott Laughton, goal-less in his last 23 games, said about the team’s funk. “ ... It seems like when we have a play, it bounces off our stick. We have to figure it out. It’s been a tough stretch, but we have to work through this.”

They have nine games remaining.

Lafrenière, the No. 1 overall draft pick last year, scored his ninth goal of the season to make it 3-1 with 10 minutes, 36 seconds to go. Filip Chytil later made it 4-1.

The Flyers squandered a five-on-three power play for 1:22 late in the second period. After the power play turned into a five-on-four, Flyers goalie Alex Lyon stopped center Chytil’s shorthanded breakaway to keep the Flyers’ deficit at 2-1.

“We had some great looks,” coach Alain Vigneault said of the five-on-three. “Their goaltender just seemed to be at the right place at the right time tonight. He was the difference for me.”

Lyon (20 saves) made his second start of the season and 12th of his career, which has spanned parts of four seasons with the Flyers. He was searching for his first win since 14 months ago (6-3 over Colorado) and his first road victory in three years (4-2 in Carolina)

» READ MORE: Center Jackson Cates makes NHL debut as Flyers face Rangers

It was the finale of a bizarre eight-game season series in which the Rangers outscored the Flyers, 21-4, in their three regulation wins, including 9-0 and 8-3 wipeouts.

It was a series in which the Flyers went 4-3-1, despite getting outscored, 33-20.

It was a series in which Zibanejad had 18 points against the Flyers, tied for the third-most ever produced against them in a single season.

The only players who had more: Legendary forwards Mario Lemieux and Mike Bossy, Hall of Famers who each had 19 points in a season vs. Philadelphia. Bossy did it for the Islanders in 1981-82, and Lemieux duplicated the feat in 1992-93, a season in which he had 69 goals and 160 points in 60 games. (In case you were curious, Bossy had 64 goals and and 147 points in 80 games during the year he torched the Flyers. And others.)

Laughton, who led the Flyers with five hits, was involved in a second-period fight with Kevin Rooney.

“You have to try to change a little bit of the momentum,” Laughton said, “but it didn’t work.”

» READ MORE: Claude Giroux says it’s ‘confusing and frustrating’ that Flyers’ up-and-down trend has lasted 10 years

As has become customary in the last seven-plus weeks, the Flyers fell behind early. They gave up the first goal for the 15th time in the last 17 games as Kreider scored on a power-play tip-in, his 20th goal of the season.

After Oskar Lindblom tied it with his seventh goal, Buchnevich scored his 20th goal, beating Lyon as the defense allowed him to skate in unopposed from the right end line. That gave the Blueshirts a 2-1 lead with 12:04 left in the first.

Looking for a reason why the Flyers have fallen out of the playoff race?

Try this: Since the start of March, the Flyers have been outscored in the first period, 42-18.

And this: The Flyers have not scored more than three goals in 18 of their last 19 games, including the last 13.

“They’re probably fighting it a little bit,” Vigneault said of his players’ prolonged scoring slumps, “but tonight we had some great, great looks to come back in this game and just couldn’t find the back of the net.”

With the rest of the season almost meaningless, Laughton insisted it’s not difficult to get motivated.

“It shouldn’t be. It’s the NHL. It’s the best league in the world,” he said. “It’s a privilege to play in the league, and I think you have to come to work every day. ... There’s a lot of worse things going on in the world. You have to come to work every day and work as hard as you can for the guy next to you.”