Financial terms were not released. The 29-year-old defenseman could have been an unrestricted agent for the first time July 1.

"I'm super excited to continue my journey with the Sharks," Karlsson said. "Since my first day here, I have only good things to say about the people, organization and the fans. The entire Bay Area has been extremely welcoming to me and my family. I appreciate that, and we can't wait to spend the next eight years in San Jose.

"As far as hockey goes, I'm excited to continue the chase for the ultimate prize: the Stanley Cup. Last year was an unbelievable run but we didn't achieve what we set out to do. But the dedication I witnessed from my teammates, coaches, staff and organization showed me that we all have a great future ahead of us, and that we are capable of fighting for that championship year in and year out."

[RELATED: Karlsson, Sharks put faith in each other]

Karlsson had 45 points (three goals, 42 assists) in 53 games during his first season in San Jose and was tied for second on the Sharks with 16 points (two goals, 14 assists) in 19 Stanley Cup Playoff games. However, he was injured and did not play when they were eliminated by the St. Louis Blues in Game 6 of the Western Conference Final on May 21.

"This is a place I want to be and can reach my potential," Karlsson said. "I have nothing but good things to say about everyone, the trainers, the staff, everyone. This was a big decision for me. I know this is the right one for me, for my family and the organization. I'm happy with how everything happened and that they didn't force me into making a decision earlier than this. The process was handled well on both parts."

Video: Karlsson signing shows Sharks still in "win-now" mode

Karlsson was acquired with forward prospect Francis Perron in a trade with the Ottawa Senators on Sept. 13 for forwards Chris Tierney, Rudolfs Balcers and Josh Norris, defenseman Dylan DeMelo, a second-round pick in the 2019 NHL Draft and a conditional pick in the 2020 NHL Draft.

He had surgery to repair a groin injury May 31. The Sharks said he is expected to be healthy for the start of next season.

"We are extremely pleased that Erik and his wife Melinda have committed to the San Jose Sharks and that they have done so prior to July 1," Sharks general manager Doug Wilson said. "Players with Erik's elite level of talent are rare and when they become available, it's important to be aggressive in pursuing them. He is a difference maker who consistently makes the players around him better. We are pleased that he has been proactive in addressing his injury from last season and are looking forward to him being part of our organization for a long time to come."

Selected by Ottawa in the first round (No. 15) of the 2008 NHL Draft, Karlsson has 563 points (129 goals, 434 assists) in 680 regular-season games with the Sharks and Senators, and 53 points (eight goals, 45 assists) in 67 playoff games. He has won the Norris Trophy as the NHL's best defenseman twice (2011-12, 2014-15) and has been named an NHL First-Team All-Star four times (2011-12 and 2014-15 through 2016-17).

---

Listen: Impact of Karlsson staying from NHL Fantasy on Ice podcast