When the Islanders’ lead was cut in half in the opening minute of the third period, the sense of impending doom began wafting through Nassau Coliseum.

After all, the Islanders had won just nine of their 20 previous games in which they led after two periods. But Ryan Strome scored 39 seconds later to restore the two-goal lead, and the Islanders cruised from there in a 4-1 victory over the lowly Sabres.

On a recently completed road trip, the Islanders let two-goal leads get away in the third periods of losses to Edmonton and Calgary on consecutive nights.

“When [Buffalo] got that power-play goal to start the third period, I know you guys were thinking, ‘Here we go again,’“ Islanders coach Jack Capuano said. “We battled back and we were resilient. It was a good bench. Guys were positive.”

Frans Nielsen and Kyle Okposo staked the Islanders to a 2-0 lead in the first period. Strome then netted the big goal to push back the Sabres, and Cal Clutterbuck sealed the win with an empty-net goal one night after the Islanders lost 4-3 at home to San Jose.

The Islanders (26-34-9) earned their 10th home win (10-17-8), and did it in a rare matchup against an opponent they are ahead of in the standings.

“Anybody can beat anybody in this league no matter where you are,” Okposo said. “That’s been proven throughout this whole year. They’ve got some skill over there.

“We stuck with our game plan and we outplayed them.”

Backup goalie Anders Nilsson (3-4-2) earned the win in his 15th NHL game. He lost his shutout bid 56 seconds into the third when Tyler Ennis scored.

Nilsson made 33 saves while subbing for No. 1 netminder Evgeni Nabokov, who lost on Friday.

“I had the post with me one time, and I think the whole team in front of me played an unbelievable game,” said Nilsson, who will turn 24 next week. “They cleared the guys who were in front of me, so I got a clear view of every shot. That makes it a lot easier.”

Jhonas Enroth stopped 34 shots for Buffalo, which has the fewest points and goals in the NHL.

Despite being outshot 14-10 and short-handed three times in the first period, the Islanders took a 2-0 lead.