The Islanders got the much-needed go-ahead goals and timely saves that had eluded them on this homestand and were rewarded with a 2-1 victory that ended the Tampa Bay Lightning’s seven-game win streak.

The the Lightning were without Victor Hedman — which has hardly slowed them the past 10 games — the Islanders’ post-Palmieri and sans-Pageau lineup started to settle in for a nicely disciplined but hair-raising finish as the Lightning repeatedly threatened with a sixth attacker.

Ilya Sorokin made 27 saves including several at 6-on-5, and he was aided by blocks from Ryan Pulock, Simon Holmstrom and a host of others as time wound down. Three unconverted looks at the empty net did not end up haunting the Isles, who ended a three-game winless slide to go 2-3-1 on this homestand with one more to go.

Of course, like just about every game on this homestand and indeed the road trip before it, it could’ve gone differently. The Lightning came out ready to strike {sorry} with several golden chances in the opening. But the Islanders settled things down and ended up getting some great chances of their own in what ended up as a scoreless first period.

Bo Horvat’s goal in the first minute of the second period hinted that maybe finally the pendulum of luck was going to swing back their way. When Calum Ritchie made a nifty short pass in the slot to Anthony Duclair (on a sequence Duclair started with a takeaway) for Duclair’s fourth goal and a 2-0 lead, the possibility of a win cracked open.

Sorokin was great all night except for the goal he allowed with 3:34 left, a bad-angle shot that bounced in off his side through the only gap available.

That left the final stretch, which was nerve-wracking — especially after the Isles missed their shots at the empty net — but in the end they got the regulation win they needed to feel like all this “played well enough” will occasionally pay off.

Other than a redirection stop as they clung to a one-goal lead, Sorokin’s best stop may have been with about seven minutes left in the second period. The Islanders had a nice push started by a Duclair interception, but then they got caught in a bad change that enabled an uncontested break-in for Anthony Cirelli. The Lightning forward made a a great couple of moves, but Sorokin stretched in an abdominals-defying way to make the pad save.

The homestand concludes with an even better opponent, as the Colorado Avalanche begin a road trip here Thursday in Brock Nelson’s return. They had one regulation loss heading into tonight’s contest with the Canucks.