The San Jose Sharks are holding on to Kiefer Sherwood, signing the high-energy forward to a five-year extension with a $5.75 million average annual value on Wednesday.

The contract includes signing bonus payments in the first four years and some trade protection.

“We are very excited to have Kiefer remain in San Jose and be part of the group that we are building,” general manager Mike Grier said in a statement. “The ingredients he brings to our line-up on a nightly basis blend extremely well with the skillsets of his teammates, and we look forward to his contributions in the years to come.”

The Sharks acquired Sherwood from the Vancouver Canucks on Jan. 19 for two second-round picks and were open to flipping him to another team ahead of Friday’s deadline if they couldn’t work out a new contract, rather than risking losing him for nothing in free agency.

The 30-year-old is in the midst of a career-best season, with 18 goals and the second-most hits in the league (238). That helped earn him a significant raise on the $1.5 million he’s pulling in this season.

San Jose didn’t end up getting much of a window to make its own evaluation on the player because of the Olympic break and a minor injury Sherwood was nursing after arriving from Vancouver. He’s played just five games in Sharks teal, putting up one goal, two points and a team-best 28 hits.

Sherwood has spent time skating alongside top center Macklin Celebrini at five-on-five and scored the winning goal in Tuesday’s 7-5 victory over the Montreal Canadiens. The Sharks enter play Wednesday four points out of a playoff spot in the Western Conference. They’re seeking their first playoff berth since 2018-19.

While it took some time for the Sharks and Sherwood’s agent, Judd Moldaver, to hammer out the contract, the team ultimately decided it was best to make a long-term investment in a player it believes can contribute to its return to being competitive.

One game didn’t figure to influence Grier’s decision, but in a victory over Montreal on Tuesday, Sherwood displayed the impact he can make when he’s at his best. Sherwood battled with Canadiens forward Josh Anderson, dished out a team-leading five hits and put four of his seven shot attempts on net. His goal on the power play with 3:26 left snapped a 5-5 tie after Montreal rallied from a 5-2 deficit.

The term and the price might look high for a player with modest overall statistics. But Sherwood could be Tom Wilson-lite for the Sharks because of the way he combines his edgy game with a scoring touch.

The contract could become a burden if Sherwood fails to produce. That is the risk Grier is taking. But the Sharks could also have a middle-six hitter who can hold his own on the Sharks’ top two lines and be a finisher on the power play.

The Sharks didn’t have a forward with that combination. Sherwood also is now in place if the Sharks move on from 2024 free-agent signing Tyler Toffoli down the line. More importantly, Sherwood’s game should be an asset in a playoff series. San Jose might not get there this season, but management — and a patient and reinvigorated fan base — are counting on postseason games in the coming years.

This extension, along with the re-signing of center Alexander Wennberg in January, it is an example of Grier starting to power the Sharks out of their rebuild, as superstar center Celebrini and young talents Will Smith, Michael Misa and Sam Dickinson continue to form a new core.