A couple of hours before a game against the big-scoring, high-flying Stars, Islanders coach Jack Capuano issued words of caution: “You don’t want to get in a shootout with these guys.” By the end of the night, it was reasonable to ask, “Why not?”

The Islanders got rolling after a tough night against the Penguins Saturday and kept rolling just enough. This time, they built a 5-2 lead after two periods, then hung on to beat the team that entered Sunday night with the best record in the NHL, 6-5.

Cal Clutterbuck, having begun the night overcoming one injury then having to shake off another, scored two goals. So did Kyle Okposo. Anders Lee and Mikhail Grabovski had one apiece as the Islanders erased a bad memory from the night before and extended a streak of solid play to 4-2-0. They also handed the Stars their first two-game losing streak of the season.

Not that Capuano drew it up the way it occurred. The third period was wild, with two goals by Valeri Nichushkin of the Stars and one with only 1:42 left, by Jason Spezza, after the goalie had been pulled. It made the Islanders happy that Clutterbuck scored shorthanded midway through the third. In any event, the Islanders did prove they can play run-and-gun with the best of them.

By the start of this semi-matinee (5 p.m. faceoff), the 5-2 loss in Pittsburgh Saturday night was a thing of the past. “You’ve got to have a short memory,” Capuano said. “There’s so much parity in this league that there’s such a small margin for error. You’ve got to be at your best in every category.”

Truth be told, the 5-2 loss Saturday wasn’t as close as the score might lead you to believe. The Islanders got a couple goals late. Then again, if you listen to the Islanders tell it, it wasn’t as bad as the score made it seem.

“I like playing, with this hockey club, back-to-back,” Capuano said before the game. “I thought we played a pretty solid game last night. Obviously special teams weren’t exactly what we were looking for. The difference in the game was three goals, we gave up two power plays and a shorthanded. You’re not going to win many games like that, but structurally and the effort that the guys gave us even strength was pretty solid.

“As a coach, you’re down because you lost the game. But I look for effort, I look for structure and how we play the game.”

His team fell behind twice in the first period Sunday and came back both times. In fact, the Islanders left for the first intermission with momentum, and a hand from the Barclays Center crowd, after Okposo stretched out, left his skates and whipped a shot past Kari Lehtonen at 18:28 that tied the score at 2 (and sent the TV crew searching for tape of Mike Bossy’s acrobatic playoff goal against the Canucks). That, combined with Lee’s earlier goal, allowed the Islanders a sense of confidence.

By the end of the second period, the Islanders left the ice to a big cheer from the crowd of 14,054, holding a big lead. The score was the same, in fact, as it had been at the end of Saturday’s game.

The Islanders were miffed when Clutterbuck — game-time decision to play after he left Saturday’s game with an injury — was rammed into the side boards during a penalty kill by Jason Demers. Clutterbuck had to leave with an injury. Demers left, too, with a five-minute major and game misconduct.

Okposo made the Stars pay with a power-play goal at 8:13. The two-goal night ended a drought for him dating to Dec. 12, when he also scored twice. Speaking of droughts, Grabovski had not scored since Dec. 4, but he put one in this time, as he stood unmarked at the right post and tapped in a neat cross-crease feed from Ryan Strome at 15:02.

Not quite three minutes later, Clutterbuck — back on the ice for a second shift after the hit from Demers — scored from the left circle to make it 5-2.

Notes & quotes:Defenseman Johnny Boychuk’s status remained unclear. Capuano said before the game that the team’s medical staff is “going to continue to take a look at him today and probably tomorrow . . . We should know more, I would say, by Tuesday.” Boychuk went hard into the boards in Buffalo on New Year’s Eve and quickly left the ice with what appeared to be a left shoulder injury. Adam Pelech filled in on defense Sunday night, after Brian Strait played in Pittsburgh Saturday.

Goalie Jaro Halak, out since the Christmas break with an upper-body injury, skated Sunday but did not dress for the game. He will be re-evaluated after practice Monday, Capuano said. The coach complimented backup goalie Christopher Gibson, who made his NHL debut Saturday with the Islanders getting beaten soundly by the Penguins. “I thought Gibby did a real solid job for us when he went in there: 17 shots, only one goal,” he said.