BOSTON — Jesper Boqvist scored 2:05 into overtime, Linus Ullmark stopped 28 shots, and the Boston Bruins beat the Florida Panthers 3-2 on Saturday in a matchup of the top two teams in the Atlantic Division.

Boston moved five points ahead of Florida. Both teams have four games left in the regular season – with Florida’s games all at home. The Bruins need four points to clinch the division title.

“It’s another big game, another playoff-type game against a team that’s going to be there, and those games aren’t hard to get up for,” said Boston center Charlie Coyle, who had a power-play goal in the second period. “It makes you feel good. It gives you confidence to win those ones, first off, but just to do it and play the way we want to play and know how to play.”

Charlie McAvoy also scored for the Bruins, who improved to 5-1 since Coach Jim Montgomery blasted the team during practice on March 25 for their lack of attention to details and not being prepared for the playoffs.

“I just think that was a wake-up call that our group needed that day,” Montgomery said. “I think why we’re 5-1 is because our team is growing and maturing, and we have great leaders.”

Matthew Tkachuk and Aleksander Barkov scored for the Panthers, who lost for the fifth time in seven games. Sergei Bobrovsky made 26 saves.

The Bruins swept the four-game season series between the teams and moved a point behind the New York Rangers for the NHL’s best overall record.

The Panthers knocked out Boston in the opening-round of the Stanley Cup playoffs last spring after the Bruins set NHL records for wins (65) and points (135).

In the extra period, Boqvist skated down the left wing on a partial breakaway after poking the puck away in the defensive zone, and fired a wrister inside the left post for the win.

With the Panthers trailing 2-1 and the teams skating 4-on-4 due to matching minor penalties, Barkov snapped a rebound past Ullmark 5:24 into the third period.

“I thought we got better in the third period,” Panthers Coach Paul Maurice said. “We had nothing in the tank to do it. They pushed through it. I was happy with the effort. I wasn’t happy with the result, but happy with the effort.”

Tkachuk was in the penalty box for interference late in the second period when Brad Marchand sent a pass from the left wing to Coyle, who was hustling down the slot. He redirected it inside the left post for his 25th goal, making it 2-1 with 4:15 remaining in the second. The goal ended Boston’s 0-for-13 power-play drought.

Bobrovsky made a sprawling left-pad save on Marchand’s bid from in close with just under a minute left in regulation.

Florida outshot Boston 13-5 in the third period.

Ullmark made a glove stop on Evan Rodrigues at the end of a 2-on-1 break with just over six minutes left in the third.

“Linus was again really good,” Montgomery said. “He just continues a lot of impressive starts in a row here, making real desperation saves look easy.”

Tkachuk took advantage of a crazy bounce when Vladimir Tarasenko’s entry into the zone along the boards hit high off the back glass and bounced directly to Tkachuk in the slot, where he slipped a wrister past Ullmark to make it 1-0 just 37 seconds into the opening period.

McAvoy tied it at 5:42 of the first when he collected Danton Heinen’s backhand pass in the high slot before firing a wrister past Bobrovsky’s glove.

The teams showed a bit more intensity than a normal regular-season game, with tussles and scrums after whistles numerous times.

“It’s fun, it’s emotional,” McAvoy said. “I thought both teams played hard today and it was a really good hockey game.”