SUNRISE — Anton Lundell scored twice in the final five minutes of regulation, capping a stunning three-goal third-period rally as the Florida Panthers erased a 4-1 deficit to defeat the Detroit Red Wings 5-4 at Amerant Bank Arena on Thursday.

Lundell, who has now scored five goals in his last five games, first cut the deficit to 4-3 at 2:32 of the third period before delivering the winner at 17:20, taking a no-look backhanded pass from Brady Tkachuk through heavy traffic and beating goaltender John Gibson. “It’s big games and every game matters,” Lundell said. “It doesn’t matter if it’s now or Game 80, it’s still two points.”

The comeback required the Panthers to survive a second period in which Detroit extended its lead to 4-1 just 17 seconds in when a Lucas Raymond shot — his first career goal against Florida — deflected off a Panthers skater and past goaltender Akira Schmid. Marcos Kasper added a tip-in at 12:08 to push the lead to 4-1 before defenseman Gustav Forsling gave Florida life with a wicked shot at 19:42 to make it 4-2 heading into the third. “I mean, end of the period there, I think we got some juice from that, and we brought it into the third,” Forsling said.

Veteran Lars Eller, just a few games removed from his 1,200th NHL game, tied the contest at 4-4 at 16:29 by batting in a pass from Niko Mikkola, igniting the Amerant Bank Arena crowd. Head coach Paul Maurice credited both Mikkola and the building. “I thought Niko was good all night,” Maurice said. “I thought he was the guy who didn’t look like he was showing a lot of fatigue. Sometimes you don’t have the juice, you need it from somewhere else. The crowd got going for us there. They were great.”

Maurice said his message between the second and third periods was simple. “I was strictly the first two periods don’t matter. We got twenty minutes and all we need is one to tilt this thing,” he said.

Forward Carter Verhaeghe, who recorded three assists for his 17th three-point game as a Panther, said Forsling’s late second-period goal was the turning point. “I think getting one at the end of the second there in the last minute definitely gave us some momentum going into the third,” Verhaeghe said. “It definitely gave us something to build on right away.”

Sam Reinhart opened the scoring at 3:52 of the first period, a goal that made him just the second player to reach 200 goals as a Panther, joining captain Aleksander Barkov. Detroit responded 15 seconds later when J.T. Compher beat Schmid on a breakaway to tie it 1-1, and Andreas Englund’s tipped point shot at 13:14 put the Red Wings ahead for good through the first period. Schmid finished with seven high-danger saves, per NaturalStatTrick.com, and 10 different Panthers registered at least one point. Matthew Tkachuk extended his assist streak to six straight games, while Eller posted a team-high plus-4 rating. The Panthers led 12-4 in scoring chances in the third period.

Improving to 11-7-2, Florida has won six of its last nine games and recorded its second multi-goal, third-period comeback victory of the season. “That was a challenge,” Lundell said. “We felt like we have a great chance to win the game. All we needed was one goal, and we got that in the second period. And after that, we went all out or all in and just believed that we could come and win the game.”

The Panthers open a road back-to-back Saturday against the St. Louis Blues at Enterprise Center, with puck drop set for 7 p.m. ET.