UNIONDALE, N.Y. (AP) -- Kevan Miller scored the go-ahead goal late in the second period, Tuukka Rask stopped 43 shots, and the Boston Bruins beat the New York Islanders 5-2 Thursday night.

Reilly Smith, Patrice Bergeron, Torey Krug and Zdeno Chara also scored for Boston, which won for the seventh time in 10 games. Smith and Milan Lucic also had two assists each.

Boston Bruins center David Krejci (46) celebrates a goal by defenseman Torey Krug as New York Islanders left wing Josh Bailey (12) and goalie Jaroslav Halak (41) react during the third period
Boston Bruins center David Krejci (46) celebrates a goal by defenseman Torey Krug as New York Islanders left wing Josh Bailey (12) and goalie Jaroslav Halak (41) react during the third period (AP Photo/Kathy Kmonicek)
loading...

John Tavares and Michael Grabner scored for New York, while Jaroslav Halak stopped 28 shots. It was the Metropolitan Division-leading Islanders' fifth loss in 22 games (17-5-0) at home this season.

Miller put the Bruins ahead for good with 3.4 seconds left in the second. He intercepted Halak's clearing attempt at the right wing boards just inside the blue line, and fired a quick shot that found the back of the net to give Boston a 3-2 lead.

Krug's goal 1:45 into the third essentially decided a game that had seen wild momentum shifts. Chara added an empty-netter with 2:06 left.

Boston enjoyed a 2-0 advantage midway through the due to the duo of Smith, Bergeron.

Smith opened the scoring with 6:01 left in the first period by driving to the net and redirecting Milan Lucic's feed past Halak. Bergeron pushed the lead to 2-0 with a power-play goal 2:10 later.

Rask tried to make the lead stand. The Boston goaltender's toughest stop was a diving save on Michael Grabner's goalmouth backhand attempt 5:34 into the second. The Boston goalie was also the beneficiary of some good fortune as Brock Nelson had a wide open net 46 seconds later, but his shot hit the post.

However, a misplay by Rask allowed the Islanders back into the game.

Rask couldn't control Tavares' dump-in from the neutral zone, and the New York captain lifted a backhander into the net 8:25 into the second to cut the deficit to 2-1. The goal was Tavares' 23rd of the season and his fourth in four games.

Grabner drew the Islanders even with 4:48 left in the second with his fifth of the season, setting the stage for Miller's tiebreaking score.

Boston evened the season series against New York at 1-1. New York won the first game, 3-2 on Oct. 23 in Boston. The teams will end the season series Feb. 7 at Boston.

NOTES: As part of the franchise's commemoration of its final season on Long Island, the Islanders feted Hall of Famer Mike Bossy prior to the game. Bossy scored 573 goals in 752 games, and won four Stanley Cup championships in nine seasons with the Islanders. "This whole season is a little surreal," Bossy said during a morning press conference at Nassau Coliseum, when asked about the Islanders' 2014-15 campaign. "I don't think anybody expected to be the team to be where they are. They seem to (have found) a chemistry." ... Boston scratched D Matt Bartkowski and RW Jordan Caron. New York scratched D Matt Donovan.

(© 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)

More From New Jersey 101.5 FM