Brock Nelson got his standing ovation.

The Islanders got their two points.

Maybe that wasn’t how Nelson envisioned his return to UBS Arena going, and who could blame him given that the Avalanche had lost just once in regulation all year and once in their last 13 games.

But a night that began focused on Nelson’s first game back on Long Island became about the Islanders earning their best win of the season so far, beating juggernaut Colorado 6-3 to finish out a rocky seven-game homestand strong.

It was just over a couple of weeks ago when the Islanders thought they played their best game of a seven-game road trip in Denver, only for it to be the only game they lost on that swing.

The Islanders celebrate a goal during their Dec. 4 win against the Islanders. Robert Sabo for the NY Post

They will feel more than validated by what they saw Thursday, when a lineup without Jonathan Drouin — scratched after taking warmups due to a lower-body injury and called day to day — not only hung around with the current Stanley Cup favorites, but never trailed.

Matthew Schaefer and Ryan Pulock, asked to take on the matchup against Nate MacKinnon, Martin Necas and Artturi Lehkonen, hung tight, with the rookie continuing to prove he is up for any challenge.

Ilya Sorokin was terrific in making 35 saves, standing up to numerous barrages around the crease to continue a brilliant run of form.

Mathew Barzal, who has disappeared across portions of the last couple of weeks including Tuesday’s win against Tampa Bay, had his best game of the season, bar none.

Simon Holmstrom battles for the puck during the Islanders’ Dec. 4 win against the Islanders. Robert Sabo for the NY Post

He was incisive, engaged and creative as ever.

He pulled up and delivered a cross-ice feed for Anders Lee’s one-timer that made it 2-0 at the 18:20 mark of the first, then with the Islanders needing to claw back some momentum late in the second, he skated past two defenders and finished on his backhand to make it a 5-2 game.

That did not, as the Islanders hoped, portend an easy finish.

Artturi Lehkonen’s one-timer from Cale Makar cut the Islanders’ lead to 5-3 just 83 seconds into the third, moving the pieces into place for a madcap ending.

Even after Scott Mayfield was called for tripping with under four minutes to go, giving Colorado a chance to skate six-on-four, that ending never came.

The Islanders absorbed pressure for nearly the entire third period, but defended with excellent structure, winning battles at their own blue line, on the wall and in the corners, forcing the Avalanche to come back again and again into their own zone.

Ilya Sorokin protects the net during the Islanders’ Dec. 4 win against the Avalanche. Robert Sabo for the NY Post

Finally, with 1:15 to go, Emil Heineman’s empty-netter sealed it.

After Valeri Nichushkin and Necas had cut a 4-0 lead to 4-2 with goals 1:25 apart midway through the second, Barzal’s goal was the one the Islanders needed badly.

Earlier in the second, Bo Horvat and Adam Pelech had scored just 1:01 apart to double a 2-0 lead, both goals coming as a result of poor goaltending from Mackenzie Blackwood — Horvat’s off a rebound, Pelech’s from a shot from the left circle that should have been easily stopped.

On the ice from Long Island

Sign up for Inside the Islanders by Ethan Sears, a weekly Sports+ exclusive.

Thank you

All four lines competed across both zones in an effort that saw Kyle MacLean net the fourth line’s first goal of the entire homestand to open the scoring 5:56 into the game.

The Avalanche, though, are never out of a game, and they were not out of this one.

This is a win the Islanders can hang their hats on, and combined with Tuesday’s win over the Lightning, a win that will validate the self-belief they kept intact through a 1-3-1 start to this homestand.

Especially if Drouin is out through this weekend, the Islanders are not out of the woods yet.

But they are right in the mix in an Eastern Conference where just six points separate first place from 12th.

And after Thursday, you would be silly not to take them seriously.