BUFFALO -- Tage Thompson scored four goals to help the Buffalo Sabres rally for a 5-2 win against the New Jersey Devils at KeyBank Center on Friday.

“I think if you look at the season as a whole, there’s a lot of games or situations where things didn’t seem to go our way as a group or individuals,” Thompson said. “And, obviously, last [game] (a 6-2 loss to the Ottawa Senators on Wednesday) didn’t go the way we wanted and wasn’t a good enough effort especially at the time of the year we’re at right now.

“I thought, kind of get off to a similar start down two, it would have been easy to kind of just fold the tent and pack in and I thought we responded the right way. I think that says a lot about the character in the room and the guys we’ve got here. So, it was nice to get that one. It feels really good.”

Alex Tuch had two assists, and Devon Levi made 28 saves for the Sabres (35-34-5), who had lost three of their previous four games. Buffalo moved within six points of the Washington Capitals for the second wild card into the Stanley Cup Playoffs from the Eastern Conference with eight games remaining but has played two more games than Washington.

“I don't think we got down on ourselves,” Tuch said. “I think we just tried to play a little simpler, get our energy up a little bit and it took us a little longer than wanted to. But all in all, I thought it was a good game by us and when we needed him to, ‘Beast’ (Levi) was keeping them out. And we just tried to capitalize on some of the mistakes.”

Max Willman and Jesper Bratt scored, and Jake Allen made 31 saves for the Devils (36-34-4), who had won two in a row and four of five. They remained five points behind Washington, having played two more games, and six points behind the Philadelphia Flyers for third place in the Metropolitan Division.

“We know that was a game we should have taken advantage [of],” New Jersey captain Nico Hischier said. “I don’t think there are any excuses. I think if you look at the game, we’ve just got to find a way to win against certain teams and we haven’t done that all year. It should not happen. Just another immature performance by us.”

Willman gave the Devils a 1-0 lead at 3:00 of the first period when his deflection of a Luke Hughes point shot hit Buffalo defenseman Rasmus Dahlin before beating Levi through the pads.

Bratt made it 2-0 at 10:31. Hischier sent a pass in front from behind the net, and Bratt collected it in the left circle before scoring on a wrist shot to the short side.

“When you go up 2-0, obviously you know that they’re going to have a push and they did,” Bratt said. “We had some breakdowns in our game and some small mistakes that they capitalized on. Not great right now.”

NJD@BUF: Bratt ships in a shot from the circle to make it 2-0

Thompson cut it to 2-1 at 28 seconds of the second period. After Devils forward Timo Meier turned the puck over near his own blue line, Thompson got to it and took it to the left circle before shooting over Allen’s left shoulder.

Thompson tied it 2-2 at 17:29 when he received a pass from Tuch in the slot and again beat Allen over his shoulder.

“I knew there was still a lot of hockey to be played,” Levi said. “It's easy to feel like it's the end of the world, you let in two quick ones, but it's when the mental toughness comes in. That's when you rely on your teammates and you kind of come together as a group and just chip away at it and try to get back into the game. I had no doubt in the boys.”

Thompson put the Sabres ahead 3-2 at 15:26 of the third period. Dahlin’s point shot trickled through Allen, and Thompson was on the doorstep to push the loose puck across the goal line.

“He’s one of the best defensemen in the world,” Thompson said of Dahlin. “… We knew we had a tired group out there (the Devils) and ‘Dahls’ makes a great play to the net, and … it was a battle in front of the net. That’s the difference and obviously we’ve been on the other side of that, so we know how important those shifts are.”

JJ Peterka scored into an empty net at 19:23 to make it 4-2, and Thompson added another empty-net goal at 19:54 for the 5-2 final.

“I think it’s a good time that we have a few days off right now, especially after you lose a game like that to regroup, refocus,” said Devils interim coach Travis Green, whose team next plays Tuesday when it hosts the Pittsburgh Penguins. “And then, really, all we can do is worry about the next game.”

NOTES: Thompson’s hat trick was his sixth with the Sabres, tied for the seventh-most in Buffalo history. He became the fourth player in Sabres history with multiple four-goal games, joining Rick Martin (four), Dave Andreychuk (three) and Alexander Mogilny (two). … Thompson is the fourth active player with multiple four-goal games, joining Capitals forward Alex Ovechkin (four), Los Angeles Kings center Anze Kopitar (two) and Colorado Avalanche center Nathan MacKinnon (two). … Tuch extended his assist and point streaks to seven games; he has 10 points (one goal, nine assists) in that span. … Peterka has five goals during a four-game goal streak. … Hughes’ assist on Willman’s goal was his 41st point of the season, moving him past Scott Niedermayer for the fourth-most points in a season by a rookie defenseman in franchise history. Hughes has nine goals and 32 assists. … Bratt tied his NHL career high with 73 points (24 goals, 49 assists), which he reached twice previously (2021-22, 2022-23).