Anders Lee of the Islanders, center, reacts with teammates after scoring during...

Anders Lee of the Islanders, center, reacts with teammates after scoring during the second period against the Flyers at the Wells Fargo Center on Monday in Philadelphia. Credit: Getty Images/Tim Nwachukwu

PHILADELPHIA — The Islanders knew a regulation loss essentially would end any hope they had of making the playoffs.

Instead, they kept their longshot chance alive with a 4-3 overtime win over the Flyers on Monday night at Wells Fargo Center after Philadelphia tied it with 9.6 seconds left in regulation.

It was a game that showed equal parts desperation and sloppiness. The Islanders dominated the second period after Flyers coach John Tortorella subbed in impressive 27-year-old Russian rookie goalie Ivan Fedotov for his NHL debut, then got dominated in the third.

“We were approaching it like it was a do-or-die scenario,” said Brock Nelson, who scored the winner at 1:24 of the extra period after Kyle Palmieri forced a turnover. “Given that this is a team specifically we’re chasing.”

The Islanders (32-27-15) moved within four points of the third-place Flyers (36-29-11), who are in an 0-4-1 skid, in the Metropolitan Division with two games in hand. They also moved within three points of the Capitals — who have played one fewer game — for the Eastern Conference’s second wild-card spot. However, the Red Wings, who have played one extra game, also are three points ahead of the Islanders.

“We had to get two tonight,” said Anders Lee, who tipped defenseman Alexander Romanov’s shot from the left point for a 3-2 lead at 17:54 of the second period. “It’s tough we gave them one. It’s unfortunate, but we got our two.”

Morgan Frost pushed the puck in with 9.6 seconds left in the third period with the Flyers skating six-on-five to force overtime. It temporarily spoiled a third straight strong outing from goalie Semyon Varlamov, who made 18 of his 30 saves in the third period.

“No one was happy when that one went in because we knew exactly what it meant,” coach Patrick Roy said. “We just kept the focus and we scored a big one. We might not be happy to give them one point today, but we’re probably going to be happy down the road to have those two points.

“I was very happy with the second period. I didn’t like our third period. We were quicker on those pucks. We competed better. We put pucks deep. We broke out easy. In the third, for some reason, our compete level was not as good as the second and we didn’t make good decisions with the puck.”

The Islanders held a 17-3 shot advantage in the second period. The Flyers reversed that, 19-3, in the third.

Roy reunited Bo Horvat and Mathew Barzal as linemates in the first period, and that quickly produced a 2-1 lead for the Islanders.

Noah Cates, given room to skate in the Islanders’ zone, opened the scoring at 4:57 of the period as he beat Varlamov over his glove from distance.

But Matt Martin tied it at 12:03 of the period and Horvat’s 30th goal of the season and 500th career point came 18 seconds later off the rush on Barzal’s feed.

Tortorella pulled Samuel Ersson after he allowed those two goals on six first-period shots. Defenseman Travis Sanheim, who also beat Varlamov glove-side from distance 43 seconds into the second period after being given room to skate, allowed Fedotov to avoid playing from behind in his debut. He stopped Barzal’s breakaway at 4:55 of the second period.

“We knew this was a deal-breaker game for us,” defenseman Ryan Pulock said. “They knew what was on the line, too. There’s a few of us fighting for one or two spots. These are Game 7-type playoff games.”

Notes & quotes: Horvat went to the Islanders’ dressing room at 11:52 of the second period and was absent until 4:27 of the third period after taking a puck to the face . . . Varlamov started a third straight game for the first time since March 29-April 1, 2022, but Roy said Ilya Sorokin is “probably going to play” on Tuesday night against Chicago at UBS Arena. Sorokin’s last outing was a 4-0 loss to the visiting Devils on March 24, his sixth straight defeat. He’s allowed 16 goals in his last four starts.

More Islanders

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME