SUNRISE, Fla. — Matthew Tkachuk scored twice, Eetu Luostarinen put Florida ahead to stay with 5:38 left in what was a wild third period, and the Panthers forced a Game 7 in their Eastern Conference first-round series by beating the Boston Bruins 7-5 on Friday night.

Aleksander Barkov, Brandon Montour, Zac Dalpe and Sam Reinhart also scored for the Panthers, who got 30 saves from Sergei Bobrovsky. Reinhart capped it with an empty-netter with 28 seconds left — the seventh and final goal of the third period, four of those scores by Florida.

Tyler Bertuzzi and David Pastrnak each scored twice for Boston, which got four assists from Brad Marchand and 26 saves from Linus Ullmark. Jake DeBrusk also scored for the Bruins.

The Bruins, who finished with the best regular-season record in NHL history, took one-goal leads on two separate occasions in the third period and couldn’t hold either one of them. Now, they face a Game 7 on Sunday just to get into the second round against a Florida team that has already staved off elimination twice.

Not even three power-play goals and one short-handed tally was enough to give Boston a win, either.

The game started along the exact sequence that Game 5 did in Boston on Wednesday night: Florida took a 1-0 lead, Boston tied it. Florida took a 2-1 lead; Boston tied it. Florida took a 3-2 lead; Boston tied it.

Evidently, that’s when the teams decided a repeat performance was boring.

They combined for four goals in a span of 6:56 — this time, with the Panthers answering the Bruins.

Boston went up 4-3 on a power-play score from Pastrnak. Dalpe tied it for Florida; DeBrusk scored short-handed for a 5-4 lead, and Tkachuk got his second of the night 27 seconds later to tie it again.

And less than 4 minutes later, Luostarinen made it 6-5 — the Panthers back on top with 5:38 left, a sellout crowd in Sunrise waiving white towels in unison. Boston pulled Ullmark twice with hopes of netting the equalizer, and had good looks at it in the final minute, but Bobrovsky and Florida’s defense held on. Reinhart banged a puck off the boards, down the ice and into the net to seal the win.

Game 7 is Sunday in Boston.

This is the seventh time the Presidents’ Trophy winner will play a Game 7 in the opening round and the first since 2011. The No. 1 seed advanced in four of the previous six instances: Vancouver in 2011 against Chicago, the New York Rangers in 1992 against New Jersey, Boston in 1990 against Hartford and Calgary in 1989 against Vancouver.

The Associated Press contributed to this report.