The Buffalo Sabres have experienced several frustrating losses already this season, so a sloppy win was OK for Sam Reinhart and company.
Reinhart poked in a rebound with 4:14 left, and the Sabres edged the New York Islanders 4-3 on Thursday night after squandering a three-goal lead.
"It's unfortunate where we're at, but this is one we can hold up," said Reinhart, who also had two assists. "It was a pretty ugly one, but those are the ones you kind of have to find a way to win on a consistent basis in this league."
Jack Eichel and Evan Rodrigues each had a goal and an assist for last-place Buffalo, and Ryan O'Reilly also scored. Robin Lehner stopped 26 shots to help Buffalo salvage the finale of a five-game homestand after going 0-3-1 in its previous four games.
Never miss a local story.
It was the 1,000th home win in franchise history.
"I'm not saying I'm not happy that the guys pulled it out," coach Phil Housley said. "But I just think, over all, if you play like that, you're asking for trouble."
John Tavares, Anders Lee and Ross Johnston scored for New York, which had gone 5-0-3 in its previous eight trips to Buffalo. Jaroslav Halak stopped 18 shots.
The Islanders squandered an opportunity to jump ahead of idle Columbus for the second wild card in the Eastern Conference. They dropped to 1-3-1 in their last five games.
"Nothing was missing. We had a great game," coach Doug Weight said. "I thought we got good performances from a lot of guys. I mean, we're going to win hockey games. We just can't afford to lose those."
Reinhart got the game-winner 73 seconds after Lee tied it at 3.
Eichel began the play when his shot from the right boards hit a skate and caromed into the slot to Rodrigues, whose shot was stopped by Halak. Reinhart was left alone in front to knock in the rebound.
The Islanders have allowed three or more goals in 10 of their past 11 games.
"If we bring that same effort, that same intensity, I like our odds," Johnston said. "If we play that way and stick to the game plan, we'll start getting results here."
New York fell behind 3-0 in the second period before it started to rally. Tavares swept in a loose puck at 13:06, and the Islanders added two more in the third.
Johnston snapped a shot from the slot over Lehner's left shoulder with 12:30 remaining.
Lee tied it with a power-play goal with 5:27 left. With Eichel in the penalty box for tripping, Josh Bailey's shot from the right circle was deflected wide of net. The puck went to Lee, who jammed it inside the right post.
Buffalo was being outshot 6-0 when Eichel opened the scoring 7:41 into the game.
With Reinhart drawing three defenders to him driving up the middle, he crossed the blue line and fed a pass to a wide-open Eichel driving up the right side. Eichel skated into the circle and snapped a shot in off the far post.
Another defensive miscue led to Rodrigues' third goal just under six minutes later. Marco Scandella's shot from the blue line sailed just wide of the left post and the puck caromed off the end board. It went directly to Rodrigues, who was left untouched in the slot and directed it inside the right post.
The Sabres led 2-0 after one despite being outshot 10-4.
O'Reilly scored a power-play goal 7:18 into the second period by tipping in Rasmus Ristolainen's shot from inside the blue line.
NOTES: Buffalo's home record stands at 1,000-393-216, including a 4-1 "home" win over Anaheim in a game played at Helsinki, Finland, to open the 2011-12 season. ... Sabres D Jake McCabe will miss three to four weeks after surgery on Wednesday to repair a thumb injury. ... Weight left open the possibility of D Johnny Boychuk returning as early as Friday, when New York hosts the Red Wings. Boychuk missed his 18th game with a lower-body injury.
Islanders: Host Detroit on Friday.
Sabres: Travel to play the Boston Bruins on Saturday.