SAN JOSE, Calif. — San Jose Sharks defenceman Erik Karlsson has undergone groin surgery before becoming eligible for free agency this summer.

The Sharks said Wednesday that Karlsson had the operation last week and has already started rehabilitation. The team says Karlsson is expected to recover fully in the off-season and be ready for the start of the 2019-20 season.

The big question surrounding Karlsson now will be where he plays next season. The Sharks acquired the two-time Norris Trophy-winning defenceman from Ottawa just before the start of the season. Karlsson is eligible to become an unrestricted free agent July 1 and has given no indication whether he wants to return to San Jose or find a new team.

The 29-year-old Karlsson initially injured his groin in January and missed 27 of the final 33 regular-season games for San Jose. Karlsson returned in the final regular-season game and played in the post-season despite being visibly hampered by the injury.

Karlsson finally wore down at the end of the post-season. He missed most of the second half of the third period in a Game 4 loss to St. Louis in the Western Conference final, missed the entire third period when the Sharks lost the following game and then didn't travel for the Game 6 loss that ended San Jose's season.

Despite the injury that left him at less than full speed, Karlsson still managed to make a major impact in the playoffs. He is tied for the NHL lead with 14 assists this post-season and also had two goals, including the overtime winner in Game 3 against the Blues.

Karlsson got off to a slow start in San Jose following the trade and then was slowed by the injury over the final three months. He finished his first season with the Sharks with three goals and 42 assists in 53 games.

But during a stretch from December to January, Karlsson showed he still has the ability to be the best defenceman in the NHL. He had points in 15 straight games that he played and had 25 points total in that span.

Karlsson then got hurt Jan. 16 in Arizona. He returned to take part in All-Star weekend in San Jose but had to wait two more weeks to play a real game. He got hurt again Feb. 26 in Boston and didn't play again until the regular-season finale.

Karlsson is one of several prominent potential free agents in San Jose this summer, along with captain Joe Pavelski and franchise stalwart Joe Thornton.