BOSTON — Free agent defenseman Brandon Carlo has signed a two-year extension to remain with the Boston Bruins.

The deal will pay the 22-year-old Carlo $2.85 million per season. He had not been in camp since it opened last week and was the Bruins' last remaining unsigned free agent after Charlie McAvoy agreed to terms Sunday on a three-year contract with an average annual value of $4.9 million.

Carlo says he kept in touch with McAvoy throughout the process and it was getting difficult to sit out.

RELATED: Bruins defenseman Brandon Carlo comes to Portland

A 2015 second-round draft pick (37th overall), Carlo made the leap from major junior hockey to the NHL in 2016-17, averaging more than 20 minutes of ice time as a rookie. He's been a major part of the Bruins' top-four defense group in each of his three seasons.