The Minnesota Wild signed forward Ryan Hartman to a three-year, $5.1 million contract extension Thursday night.

Hartman was eligible to become a restricted free agent with arbitration rights this summer. The deal with an average annual value of $1.7 million will give him the most stability he's had in his NHL career, on his fourth team at age 26.

In his second season with the Wild, Hartman has six goals, 12 assists and 25 penalty minutes in 40 games. He began as mostly a fourth-line wing but lately has been centering the second line next to standout Kevin Fiala.

Minnesota Wild's Ryan Hartman misses the puck during the first period of an NHL hockey game against the St. Louis Blues Friday, April 9, 2021, in St. Louis. (AP PhotoJeff Roberson)

Minnesota Wild's Ryan Hartman misses the puck during the first period of an NHL hockey game against the St. Louis Blues Friday, April 9, 2021, in St. Louis. (AP PhotoJeff Roberson)

Hartman has 57 goals, 70 assists and a plus-16 rating in 354 career NHL games. He signed with Minnesota as a free agent two years ago, after moving from Chicago to Nashville to Philadelphia.

More AP NHL coverage: https://apnews.com/hub/NHL and https://twitter.com/AP_Sports