It was wildly entertaining with no penalties called over 60 minutes. It was fast-paced bordering, at times, on breakneck-paced yet tight-scoring thanks to impressive goaltending. But, most importantly to the Islanders, it was a win to lead into the three-day NHL holiday break.

The Islanders, following through on a mandate to get more traffic to the crease, rallied to snap a three-game losing streak with a 2-1 victory over the Devils at a sold-out UBS Arena on Tuesday night with defenseman Adam Pelech netting the go-ahead goal at 18:45 of the third period.

“Sometimes, those games [before the holiday hiatus] you’re always afraid if the focus is going to be there, especially at home, there’s a lot of distractions,” coach Patrick Roy said. “But I thought our guys really focused. We all knew what was at stake and it was important for us to have a strong game.”

David Rittich made 31 saves as he started consecutive games for the first time as an Islander with Ilya Sorokin given the week off for maintenance. That included denying Luke Glendening and Connor Brown on third-period breakaways with the game tied.

“David was awesome tonight,” said Pelech, who chipped the puck past Jacob Markstrom (23 saves) from the left after Anders Lee retrieved Simon Holmstrom’s missed chance. “All night, he stood on his head for us.”

It was the best of five games the Islanders (20-13-4) have played without top-line center Bo Horvat, scoring nine goals in a 2-2-1 stretch. Both Horvat and Sorokin are expected to be available when the season resumes against the visiting Rangers on Saturday night.

“I thought it was a great hockey game,” Lee said. “Both teams played well. There wasn’t a ton but, at the same time, you had to really earn your chances. It was a tight-checking game, no penalties. Those are the fun ones to be in.”

The second period was the best the Islanders have played through their recent slump as they held a 11-2 edge in high-danger chances according to NaturalStatTrick.com. That reversed to a 6-1 advantage for the Devils (20-16-1) in the third period.

But Rittich allowed nothing, prompting several rounds of the crowd chanting his name.

“Everybody’s going to be feeling better with the win,” Rittich said. “We knew it’s a big game. They’re a really good team but we proved as well we’re a really good team.”

Still, it took the Devils’ wacky screw-up for the Islanders to tie it at 1-1 at 12:10 of the second period. Markstrom came way out of his crease and tried to clear the puck out of the zone along the right wall. But instead it  hit defenseman Jonas Siegenthaler, bouncing right to  Holmstrom for an easy look at the emptied net.

The period started on a good note as rookie center Cal Ritchie was able to return after retreating directly to the Islanders’ room at 14:02 of the first period holding his right wrist after a collision with Nico Hischier.

“I just tweaked something that I’ve been dealing with,” Ritchie said. “It’s nothing serious at all but I wasn’t too sure at the time.”

Roy did flip flop Ritchie with Jean-Gabriel Pageau in the second period, putting him between Jonathan Drouin and Emil Heineman while Pageau skated with Anthony Duclair and rookie Max Shabanov.

Defenseman Brett Pesce beat Rittich from the slot to open the scoring at 15:35 of the first period.

Notes & quotes: Ryan Pulock and Pelech each played in their 597th game, matching Kenny Jonsson for the third most in franchise history for defensemen . . . Mathew Barzal had his seven-game point streak snapped.

Andrew Gross

Andrew Gross joined Newsday in 2018 to cover the Islanders. He began reporting on the NHL in 2003 and has previously covered the Rangers and Devils. Other assignments have included the Jets, St. John’s and MLB.