Islanders right wing Hudson Fasching is congratulated after scoring against the...

Islanders right wing Hudson Fasching is congratulated after scoring against the Ducks during the second period of an NHL game in Anaheim, Calif., on Wednesday. Credit: Alex Gallardo

ANAHEIM, Calif. — Kyle Palmieri had a career night against his former team. His linemates, Brock Nelson and Pierre Engvall, weren’t bad, either, in a game the Islanders absolutely had to win.

“It feels nice to just do it, it doesn’t matter where it was,” said Palmieri after scoring a goal and adding three assists for a career-high four points as the Islanders scored three third-period goals to snap a two-game losing streak with a 6-3 win over the Ducks on Wednesday night at Honda Center.

“Our line stepped up and was able to make a positive impact on the game in a game that was really important to us.”

The Islanders (35-27-8) also got two goals from Nelson and a goal and an assist from Engvall in that trio’s first game together after opening their three-game California swing with a 5-2 loss to the Kings less than 24 hours earlier.

“It’s a huge game for us,” said Hudson Fasching, who tied the game at 2 at 9:46 of the second period on an odd-man rush for his third goal in five games. “We let a couple slip there in a row. We can’t let that start to build. For us, bouncing back and getting that momentum going the other way again, it’s huge for us.”

Huge enough that coach Lane Lambert started Ilya Sorokin (20 saves) in back-to-back games for the first time since Dec. 22-23. The difference being Semyon Varlamov was injured then and available now. The Islanders don’t play again until concluding this trip against the Sharks on Saturday night.

The Islanders matched the Penguins’ 78 points. They hold the first wild-card spot but have played three fewer games.

But the need for a strong performance was heightened as the Capitals beat the visiting Sabres 5-4 in overtime, a three-point game between two teams chasing the Islanders being a worst-case scenario. The Capitals are five points behind the Islanders with one game in hand while the Sabres have played three fewer games and are six points back.

The Islanders had been held to three goals in their two straight losses.

“There’s always going to be nights maybe where it doesn’t click and you’re fighting it a little bit,” Nelson said. Nelson gave the Islanders a 3-2 lead with 23.0 seconds left in the second period on a laser-like one-timer from the right circle off defenseman Adam Pelech’s feed with Palmieri getting the secondary assist, then took a pass from Palmieri to make it 5-2 at 9:02 of the third period.

“Maybe the last two games felt like that. Tonight we got a lot more offensive zone time. I felt like we were making a few more plays and getting a little bit more motion and shot attempts.”

John Gibson made 27 saves for the Ducks (22-36-10), who got two goals from defenseman Kevin Shattenkirk.

“I gave our guys credit,” Lambert said. “I thought (Tuesday) night we played hard and I thought tonight we played extremely hard as well.”

Lambert flip-flopped Zach Parise, who made it 6-2 at 12:45 of the third period, and Engvall, with Parise skating on Jean-Gabriel Pageau’s line. Palmieri sprung Engvall, who has a three-game goal streak, to the crease for a 4-2 lead at 17:02 of the second period.

The Ducks took a quick 1-0 lead as defenseman Scott Harrington beat Sorokin from the high slot just 25 seconds into the game. But Palmieri connected from the right circle off Engvall’s cross-ice feed to tie it at 1 at 12:24 of the first period. Palmieri, who started his career with the Ducks before being traded to the Devils in 2015, snapped a four-game goal drought.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME