NEW YORK -- The New York Islanders needed less than a minute to break out of the scoring slump that had plagued them for the past week.
Travis Hamonic and Brock Nelson scored goals 43 seconds apart in the final minute of the first period, and the Islanders ended a three-game losing streak with a 5-2 victory against the Anaheim Ducks at Barclays Center on Monday.
The Islanders scored two goals over three games last week. But Ryan Strome won a faceoff to set up Hamonic's tie-breaking goal at 19:00, and John Tavares made a perfect drop pass that Nelson shot past Frederik Andersen with 16.3 seconds left in the period for a 3-1 lead.
"Tonight we went to the net, we shot pucks and we got some breaks," Islanders coach Jack Capuano said. "We did some of those things the last few games we lost too. It was good to see the guys get rewarded."
Cal Clutterbuck, Josh Bailey and Matt Martin scored and Jaroslav Halak made 27 saves for the Islanders (19-11-5). The victory in their final game before the Christmas break moved the Islanders into second place in the Metropolitan Division, one point ahead of the idle New York Rangers.
"It was good to get this win right before the holidays," Martin said. "We can kind of feel good about ourselves before we start the second half. We had a little bit of a losing streak that we needed to find our way out of."
Carl Hagelin and Josh Manson scored for Anaheim (12-15-5), which is last in the Pacific Division. The Ducks complete a four-game road trip against the Rangers on Tuesday.
The Islanders took advantage of an off-night by Andersen, who allowed three goals on 11 shots in the first period before being replaced by John Gibson (18 saves).
"Knowing Freddie well enough, you can tell when he's on," Ducks coach Bruce Boudreau said of Andersen. "Pucks were bouncing off him earlier that normally he would smother and control. He didn't have it tonight. If we'd have gotten out of the first period [tied 1-1], things might have been different."
The Ducks came out with more jump than the Islanders and needed less than seven minutes to take the lead.
Halak denied Anaheim forward Andrew Cogliano on a 3-on-1 rush 4:34 into the game, but the Ducks opened the scoring at 6:52 when Hagelin picked up the carom of his own blocked shot and put a wrist shot past Halak from the lower right circle. It was the third goal of the season for Hagelin and his first in 14 games.
Five minutes later, Martin took exception to a hit on teammate Nick Leddy by Manson. They got five-minute penalties for fighting, but the Islanders appeared energized.
"It's a big play for us," Capuano said. "[Martin] steps up. He does the right thing when it's necessary. You get the fans involved, our crowd involved. You get our players involved. We were playing well, but it gave us more momentum, that's for sure."
Clutterbuck got the Islanders even at 14:54 with a terrific individual effort. He got around Ducks defenseman Kevin Bieksa along the left wall, then cut toward the net and picked the top short-side corner from a bad angle near the goal line for his seventh goal of the season.
The Islanders went ahead at 19:00 when Hamonic's long wrist shot from the right boards went past Nelson's screen and caught the short side. The goal was Hamonic's second of the season and first since Nov. 20.
Tavares, who drew the primary assist on Hamonic's goal, got another one on the same shift when Nelson took his drop pass and put a shot past Andersen from the high slot at 19:43 for his 12th of the season and third in four games.
The assists were the first for Tavares since Nov. 25; he had three points (all goals) since then.
"You know when you're producing," Tavares said. "I'm just trying to make plays. I felt like I've had some good games in this stretch and just haven't gotten rewarded. I haven't been able to put the puck in the net in some games, and I know I need to be a lot better."
Ducks captain Ryan Getzlaf, who scrapped with Tavares during the second period, said Anaheim paid the price for its letdown.
"We had a mental breakdown for a minute and a half," he said. "We have to focus. We have to be mentally stronger."
Manson made it a one-goal game at 7:32 of the third period when he gloved down a rebound in the slot and beat Halak for his second goal of the season.
But Bailey restored the Islanders' two-goal lead at 9:35, turning around in the slot and beating Gibson with a slap shot. It was Bailey's seventh of the season and New York's first third-period goal in seven games. Martin hit the empty net with 2:33 remaining for his fourth goal.
The Ducks are last in the NHL in scoring. Boudreau feels the lack of offense is putting pressure on his goaltenders.
"I can't speak for them, but I'd venture to think that if I were a goalie I'd feel that I'd have to play perfect every night to have some success," he said.
The Islanders killed off a first-period Anaheim power play and have not allowed a power-play goal in a franchise-record 13 games, covering 29 consecutive kills.