NHL: Florida Panthers at Boston Bruins

Bruins defenseman Charlie McAvoy jumps into the arms of Zdeno Chara after the game-winning goal against Florida on Thursday night.

Patrice Bergeron produced two goals, including the go-ahead score with 6.7 seconds left, as the host Boston Bruins rallied to defeat the Florida Panthers 4-3 on Thursday night.

Boston won its fifth game in a row and extended its points streak to 18 games (14-0-4).

Florida has lost six consecutive games, although four of those defeats went past regulation, and, in this contest, the Panthers blew a lead and allowed two goals in the final minute.

Boston’s Matt Grzelcyk scored a power-play goal with 37 seconds left to tie the score 3-3. It was just his second goal of the season.

David Krejci scored Boston’s other goal, his 17th of the season. Bergeron has 25, and Bruins goalie Tuukka Rask made 22 saves.

Florida’s Jonathan Huberdeau had two goals to give him 20 for the season. He also had an assist to increase his point total to 68, one short of his career high, set last season.

Aleksander Barkov also scored for the Panthers. His goal was his 29th, his career high, one more than he had in 2015-2016. Barkov, who also had an assist, leads the Panthers with 70 points, and he also was whistled for just his second penalty of the season.

Florida’s Keith Yandle had two assists to up his total to 54 points. He is five away from setting a single-season record for most points by a Panthers defenseman.

The Panthers, who got 24 saves from goalie Roberto Luongo, had beaten the Bruins 5-0 on Dec. 4. Luongo earned the shutout in the earlier game.

Florida opened the scoring Thursday with 2:48 expired in the second period on Barkov’s power-play goal.

The Panthers’ power play struck again with 6:27 gone in the second as Huberdeau batted the puck in past Rask’s glove. The goal withstood a video review for a possible high-stick violation.

Boston got on the board four minutes later, scoring on its first shot on goal of the middle period. After a Panthers turnover in their own end, Krejci and Danton Heinen executed a give-and-go play that ended with Heinen tapping the puck in the net.

The Bruins tied the score 2-2 at 8:50 of the third period. Charlie McAvoy’s pass hit its mark in stride, and Bergeron did the rest, blasting a wrist shot in off Luongo’s right shoulder.

Huberdeau’s second goal gave Florida the lead at 10:55 of the third. He spun to elude the defensive effort of Zdeno Chara before hooking a shot between Rask’s legs.

But the final minute — and the game — belonged to the Bruins.