SUNRISE, Fla. — Thomas Greiss sprawled out with 35 seconds left, getting enough of Jaromir Jagr’s deflection to keep it out of the net. It was Greiss’ 42nd save on a night the Islanders needed to be bailed out. They played some of their worst defense of the season in Game 1 of the first round of the playoffs, but Greiss saved the day in a wild 5-4 win over the Panthers.

“I felt it hit me,” he said, “then I had no clue where it went after that.”

It didn’t go in, and the Islanders escaped Game 1 Thursday night with a series lead. Greiss held the fort and John Tavares pushed the team through on the other end, scoring a huge goal with 21.8 seconds left in the second period to send the game to the second intermission at 3-3 and then stripping Brian Campbell of the puck to feed Kyle Okposo for the go-ahead goal 2:33 into the third.

VoteIslanders vs. Panthers: Who has the edge?

Tavares also made a pretty play to set up Frans Nielsen for a power-play goal late in the first period to tie it at 2-2.

The Islanders were outshot 46-26, out-attempted 77-42 and outplayed for a huge portion of the night.

“I don’t want to put it all on our D, but we gave them too much time and space and I thought we didn’t close on them in the D zone fast enough,” coach Jack Capuano said. “Those were the big deficiencies tonight.”

advertisement | advertise on newsday

But the biggest difference was in goal, even if Greiss allowed four of them. Teddy Purcell opened the scoring 1:55 in, converting a two-on-one feed from Jiri Hudler. The Islanders’ Brock Nelson answered at 6:39.

Jussi Jokinen deflected Campbell’s point shot home for a Panthers power-play goal at 13:51; Nielsen answered with his power-play marker at 16:46.

$relatedItem.embed_code.value

The Panthers’ Reilly Smith scored the first of his two at 1:31 of the second. Tavares answered late after a middle period that was a mess for the Isles and nearly disastrous, with the captain hobbling off in pain after catching Nick Leddy’s wrist shot on his right leg.

With the memory of Anders Lee suffering a broken leg on Johnny Boychuk’s slap shot a week ago, Islanders fans certainly were feeling cursed seeing their most important player hobbled.

Tavares was in the right place at the right moment for his score. Okposo and Nielsen worked in deep on a pinballing puck that went to Okposo. He fed Tavares, sneaking toward the Florida net on the weak side, and Tavares buried it.

Greiss made a handful of terrific stops to keep it 3-2 through the second, including one flailing glove save on Aleksander Barkov. Tavares tied it, then helped them get the lead, and Alan Quine — in his third NHL game — dipsy-doodled around Jakub Kindl and had Ryan Strome swoop in to fire a rebound past Roberto Luongo to make it 5-3 at 6:01 of the third.

“I thought we were opportunistic tonight,” Okposo said. “Guys really stepped up, Quiner made a terrific play on the last goal, Stromie was good. We got the job done.”

After Smith cut it back to a one-goal game at 6:56, the Isles had to kill off a terrible penalty call on Matt Martin, as Campbell slashed Martin’s stick, Campbell’s stick broke and Martin was whistled for the slash. But they held on during the final 10 minutes, with Greiss’ full-stretch stop on Jagr the exclamation point on the night.

advertisement | advertise on newsday

“Doesn’t matter if it’s 10-9 or 1-0,” Greiss said. “Only matters if you win.”

Now, with the quick turnaround for Friday night’s Game 2, the Islanders need to shore up quite a bit despite the series edge. Luongo wasn’t sharp and the Panthers expended a ton of energy for naught.

“It wasn’t our best first two periods,” Travis Hamonic said. “But we won it, we move forward and we can make some adjustments.”