The Buffalo Sabres have signed free-agent center Marcus Johansson to a two-year, $9 million contract, the team announced Saturday.

Johansson, 28, has battled injuries in recent seasons. He was traded by the New Jersey Devils to the Bruins at the trade deadline in February and played only 10 regular-season games in Boston after suffering a lung contusion on a hit by the Carolina HurricanesMicheal Ferland.

After posting only a goal and two assists in those 10 games, Johansson bounced back with four goals and seven assists in 22 playoff games, forming a dynamic duo with Charlie Coyle on Boston’s third line.

Johansson is coming off a three-year, $13.75 million contract that he signed with the Washington Capitals. His best season with the Capitals was 2016-17, when he had 24 goals and 34 assists in 82 games.

After a trade to the Devils, he played in only 29 games the next season and 58 last season.