BOSTON — The Boston Bruins honored Patrice Bergeron before the game Saturday. He made sure there was a celebration at the end.

Bergeron scored a power-play goal with 2:26 left in overtime and the Bruins beat the Los Angeles Kings 5-4 after blowing a two-goal lead.

“The legend continues,” Brad Marchand of Boston said. “It’s great to see him have the game that he had. It was a great ceremony at the start. He deserves all the recognition that he’s been getting, and he’s gotten over the last few years.”

The Bruins held a pregame ceremony for Bergeron, who earlier this week became the fifth player in team history to play 1,000 games with the club. During the first period there was a video tribute that included congratulations from the Super Bowl MVP, Julian Edelman, and a former Red Sox star, David Ortiz.

“I had to kind of look away a few times,” Bergeron said. “It was pretty special to hear from all these guys.”

He had set up two other goals before beating goalie Jonathan Quick with a wrister from the right circle for the winner.

“To get the win was very special,” he said. “That’s what I said on the bench – ‘We’ve got to find a way’ – and we did.”

Marchand, David Krejci and Danton Heinen each scored a goal in a 3:22 span early in the third period to give the Bruins a 4-2 edge before the Kings came back. Los Angeles tied it on Oscar Fantenberg’s slap shot from the point with 4:47 left in regulation for his first goal of the season.

“The guys battled back,” Kings Coach Willie Desjardins said. “Was a little disappointing to start the third. We could have been better at the start of the third for sure.”

Nate Thompson’s goal cut it to 4-3 with 10:41 to play.

Charlie McAvoy had the other goal and Tuukka Rask stopped 25 shots for Boston, including Adrian Kempe’s breakaway in the first minute of overtime. The Bruins have collected at least a point in eight of their last 10 games (4-2-4).

Alex Iafallo and Anze Kopitar also scored for the Kings, who had their three-game winning streak snapped. Quick made 28 saves.

Krejci gave the Bruins a 3-2 lead just 1:30 after Heinen tied it early in the third. Skating in on a rush, Torey Krug fired a shot off the right post before Krejci sent the rebound into the net.

Heinen had banged in a rebound from the edge of the crease 3:27 into the third.

The Bruins then took their two-goal lead when Marchand converted a perfect pass from Bergeron for a short-handed goal at the end of a two-on-one break.

Trailing 1-0 midway into the second period, the Kings scored twice in just under six minutes to move ahead. With Krejci in the penalty box for slashing, they tied it on Iafallo’s power-play goal at 8:13. Kopitar made it 2-1 when he one-timed a pass from Dustin Brown from the bottom of the right circle.