Kyle Palmieri of the Islanders celebrates his second goal of...

Kyle Palmieri of the Islanders celebrates his second goal of the first period against the Bruins with teammates Mathew Barzal, Bo Horvat and Brock Nelson at UBS Arena on Saturday. Credit: Jim McIsaac

An Islanders fan who bought a hat at the team store at UBS Arena on Saturday night would have seen 12 minutes and 19 seconds of hockey before having to make a choice: To toss or not to toss?

But given the fact that Kyle Palmieri made history in the Islanders’ 5-1 win over the Bruins and helped improve their modest playoff hopes, you can’t really blame anyone who made the financial sacrifice.

Palmieri, who hadn’t had a multi-goal game this season, scored three times in a span of 8:47 during the first period. He recorded the fastest hat trick in franchise history, the team’s first first-period hat trick since 2007 and its first natural hat trick since Brock Nelson did it in March 2022.

Palmieri scored his first goal at 3:32, his second (with the man advantage) at 5:27 and his third at 12:19. He also assisted on the Islanders’ fourth goal.

“We couldn’t have drawn it up much better,” Palmieri said. “We wanted to make it a good one and get off to a good start, and we did . . . As a line, it feels good. The last two games, we’ve been doing our best to generate, and tonight we were able to do it early on, and hopefully we just keep that rolling.”

They’ll need to, but a team that was on the brink of oblivion just a week ago now has reasonable hope ahead of Friday afternoon’s trade deadline. The Islanders have won three in a row and are five points behind the Flyers for third place in the Metropolitan Division, the final automatic playoff spot. All that combines to create a situation in which they might be buyers at this year’s deadline.

It also was a continued payoff of the new lines Patrick Roy established three games ago. The second line of Anders Lee, Jean-Gabriel Pageau and Palmieri clicked on every level. Lee and Pageau totaled two assists on Palmieri’s goals and Lee scored 46 seconds into the second period on assists from both linemates.

“He brought a finishing touch,” Lee said of Palmieri. “Those are quick pucks, they’re fast pucks. You’ve got to be able to pick it up and handle it. He did that phenomenally tonight . . . I think above that, I was on the receiving end of small, little smart plays from him all night — getting guys open, creating plays. My goal doesn’t happen without his pass over to Pager.”

Roy’s reasoning in having Lee skate with the other two: “What’s a good fit for Pageau and Palmieri? Lee is a good fit for these two guys. They’re all about the same speed. They’re all high-IQ guys. They can put pucks deep. They can use their compete level to generate. They’re going to dig for those pucks.”

Added Pageau: “We want to keep building and we’re not done. I think we saw a team that’s competing and wants to keep climbing, and that’s our main focus . . . I think communication is the key and I thought we did that well tonight. We were connected and we competed.”

Palmieri scored his first goal in transition, beating Linus Ullmark on the short side. He followed it up two minutes later, cleaning up a rebound in front of the net off Bo Horvat’s attempt, and added his third on a wrister, scoring off Ryan Pulock’s shot.

In the second, he found Pageau on the rush and Pageau fed it to Lee, who made it 4-0 only 46 seconds into the period.

Brock Nelson added his second goal in two games at 10:24 to put the Islanders up 5-0 before the Bruins (35-13-14) were able to beat Ilya Sorokin (23 saves) on Marc McLaughlin’s snap shot with 5:30 left in the period.

Perhaps above all, the crisp play was a departure from their messy win against the Red Wings, an indication of a team that has progressively bought into its new coach’s vision.

“I think it’s confidence right now and the fact that they’re playing free,” Roy said. “Structure, mindset, fundamentals. It’s hard. It takes time.

“I think that’s what we did. We kind of built around this. Sometimes you want a great start when a coach comes in and put a band-aid on it, but that’s not how it works. It’s to play the right way, and right now, we’re playing the right way.”

And three games into the big line reshuffling, they’ve also managed the improbable — creating more cohesion, even in the midst of change.

“I like the chemistry that all those lines have,’’ Roy said. “I just feel like right now, we have something good going on. The guys look sharp, they feel good, they look alive out there.”

Alive, huh? Just like the Islanders’ playoff hopes, it seems.

More Islanders

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months