PITTSBURGH — The Pittsburgh Penguins have agreed to terms with forward Conor Sheary on a $9 million, three-year deal.

Sheary will count $3 million against the salary cap through 2019-20. General manager Jim Rutherford announced the contract for the restricted free agent Sunday.

Sheary has been part of Pittsburgh's back-to-back Stanley Cup champion teams, putting up 17 points in 45 games. He spent significant time as a linemate of Sidney Crosby's during the 2016 Cup run.

The 25-year-old signed with the Penguins as an undrafted free agent. Since then, the 5-foot-8 winger has 30 goals and 33 assists for 63 points in 105 games.

Last season, Sheary had 23 goals and 30 assists in 61 games. His 53 points were fourth on the team behind Crosby, Evgeni Malkin and Phil Kessel.