David Pastrnak broke a tie late in the second period and the Boston Bruins beat the New York Islanders 5-3 on Friday night in Brooklyn.

Brett Connolly, Joonas Kemppainen and Ryan Spooner also scored for Boston. The Bruins improved to 3-0 on the road this season to go along with an 0-3-1 mark at home. Jonas Gustavsson, starting in place of the struggling Tuukka Rask, finished with 23 saves to improve to 2-0.

David Krejci had an empty-netter with 2:25 remaining for his league-leading 12th point (five goals, seven assists), giving him a point in seven straight games.

Josh Bailey, Casey Cizikas and Thomas Hickey scored for the Islanders. They snapped a four-game winning streak and lost at home in regulation for the first time this season (3-1-1). Jaroslav Halak stopped 21 shots while taking his first loss after winning his first two starts.

Hickey scored on a slap shot with 1:53 left to cap the scoring.

Trailing 2-1 after one period, the Bruins were the more aggressive team in the second and took the lead with two goals late in the period. Boston tied it when Spooner's initial shot was blocked by Travis Hamonic, but Kemppainen knocked the rebound past Halak with 3:47 left for his first NHL goal.

Pastrnak gave the Bruins the lead just over 2 minutes later, firing the rebound of Adam McQuaid's point shot past Halak.

In the third, Spooner skated across the crease and attempted to send a centering pass back to Kemppainen but the puck deflected off Islanders defenseman Marek Zidlicky's skate and in to extend the Bruins' lead to 4-2 at 8:09.

The Bruins came in the league's top power play at 8 for 21 and went 0 for 2. New York was 1 for 2.

Leading 1-0 in the first period, the Bruins had a chance to double the lead on a short-handed 2-on-1 break but Loui Eriksson's wrister was stopped by Halak.

The Islanders then took the puck down the ice and John Tavares' shot was blocked by Gustavsson, and Bailey sent the rebound from the left faceoff circle past the Bruins' goalie to tie the score on a power-play goal with 5:52 remaining. The assist gave Tavares at least a point for the fifth straight game, with three goals and six assists during that stretch.

Less than 1:20 later, the Islanders took the lead on Cizikas' first goal of the season. Johnny Boychuk sent the puck toward the net from the right side and a Cizikas skated across in front of the goal with his back to the goalie deflected the puck between his skates and past Gustavsson.

Connolly had given the Bruins a 1-0 lead just before the midpoint of the first period as he jumped on a loose puck in the right slot and snapped it past Halak.

Notes: Bruins D Zdeno Chara played in his 1,200th NHL game. The 6-foot-9 Chara was selected by the Islanders No. 56 overall in the 1996 NHL draft. He played four seasons with the Islanders before being traded to Ottawa on draft day in 2001 in a deal that brought C Alexei Yashin to New York. Chara signed with Boston on July 1, 2006. ... Boychuk played in his 400th career game. Boychuk, acquired from Boston on Oct. 4, 2014, spent six seasons in the Bruins organization and was on the Stanley Cup-winning team in 2011. ... The Islanders agreed to a three-year entry-level contract with first-round draft pick Anthony Beuavillier. The 18-year-old forward was selected with their second pick of the opening round, No. 28 overall. ... New York scratched RW Steve Bernier, G Thomas Greiss and D Brian Strait. Bernier, in his first season with the Islanders, is the only player on the roster who hasn't appeared in a game yet. ... The Bruins scratched C Max Talbot, LW Matt Beleskey and D Zach Trotman. ... Several New York Mets players - including Daniel Murphy, Jonathan Niese and Stephen Matz - attended the game.

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