The deal is for two years and will pay Halak $2.75 million per year, the Bruins said on Twitter.

After signing a four-year, $18 million contract with the Islanders in 2014, Halak set a franchise record with 38 wins in the 2014-15 season. But injuries and ineffectiveness dogged him the next few years, and he spent considerable time in the AHL.

Halak, 33, made 49 starts for the Islanders last season, but he was 20-26-6 with a 3.19 goals-against average and .908 save percentage.