The Washington Capitals have re-signed right wing Tom Wilson to a two-year, $4 million contract, the team announced on Thursday afternoon. Wilson, who was a pending restricted free agent this summer, will earn $1.75 million in 2016-17 and $2.25 million in 2017-18. His cap hit for the next two seasons will be $2 million.

Wilson, 22, is the first of Washington’s restricted free agents to re-sign, and he was the only one who wasn’t eligible for arbitration. The former first-round pick scored 23 points (seven goals and 16 assists) last season, making significant improvements in his defensive zone play. Wilson’s discipline has been an issue at times, as his 163 penalty minutes in 82 games with Washington last season led the team and was third in the league.

Capitals General Manager Brian MacLellan has said that Washington likely made a mistake in thrusting Wilson up to the NHL level too soon, as perhaps he would have been better served by spending more time with a Canadian junior team. The initial result was a first-round draft choice with limited playing time on the fourth line, and his impact was often through fighting, a reputation Wilson and Coach Barry Trotz have since tried to shed.

Shortly after the Capitals’ season ended, MacLellan described the role he envisioned for Wilson, a net-front power forward presence similar to that of former Capitals winger Joel Ward, who scored 21 goals and 22 assists last season with the San Jose Sharks. MacLellan has also alluded to Wilson being put into more offensive situations in the future, possibly even on Washington’s power play. One place there’ll be a vacancy is at third-line wing.

“You know, we miss Ward. Joel Ward — he’s the kind of guy we needed in the playoffs,” MacLellan said. “You know, you make changes, and he’s a guy that we wanted back and we didn’t get back. We missed that skill set. I think it’s on us to turn Tom Wilson into Joel Ward. It’s on Tom and on us to turn him into that kind of guy that has a net-front presence, that finds loose pucks, finds rebounds, plays good along the wall.

“I think Tom is our answer to that.”

Though the offensive upside Washington’s staff sees in Wilson has been slow to materialize, he has steadily improved with each season. In his third NHL season, he set career highs in points, goals and assists, and he played in all 82 games for the second time, the fifth player in franchise history to play 200 games before his 22nd birthday. In a first season on the Capitals’ penalty kill, Wilson thrived with his long reach, evolving into a trusted defensive forward.

When contacted earlier this summer, Wilson’s agent, Mark Guy with Newport Sports Management, said that how Wilson is projected to perform in the future would have influence on his new contract. Wilson’s deal is identical in term and average annual value to Minnesota Wild winger Jason Zucker, who re-signed on Wednesday. Both scored 23 points last season, and though Zucker is two years older than Wilson, Wilson has played in 62 more games than Zucker.

“I think when you’re going through these negotiations with guys of Tom’s experience level, there’s a lot of variables that come into play,” Guy said. “A large part of the process is projections and what role a player is going to play going forward, but it’s largely based on what he’s done in the past and what other people around the league have done with similar experience levels. All those factors come into play, but definitely there’s some projection that comes into it.”