SAN JOSE, Calif. (AP)When Doug Wilson took over as general manager in San Jose in 2003, the Sharks were a middling franchise that had won four playoff series in more than a decade and were coming off a last-place finish.

Under Wilson’s leadership the past two decades, San Jose became a destination spot that attracted stars and the Sharks turned into one of the most consistent franchises in the NHL that did everything but win a Stanley Cup.

The Sharks announced Thursday that Wilson was stepping down after 19 seasons on the job because of a medical issue that led him to go on leave in November.

”This is clearly the most successful run in our franchise history and the envy of many other franchises as well,” team president Jonathan Becher said. ”But his impact goes beyond just the ice. His impact was on all of us in the organization from the class act he was, to how he treated everybody else to the culture that he built into this organization. … His fingerprints are all over Sharks Sports and Entertainment.”

Becher said the organization had been operating with the expectation that Wilson would return until changing directions the past few days.

”While I have made great progress over the last several months, I feel it is in the best interest of the organization and myself to step down from my current duties and focus on my health and full recovery,” Wilson said in a statement. ”I look forward to continuing my career in the NHL in the future.”

Joe Will has been running the team since Wilson went on leave and will continue in that role until a full-time replacement is hired.

The search will be focused on external candidates and be handled by owner Hasso Plattner, Becher and Will. Becher said there is no rush and that a new hire might not be in place before the draft in July, but should be hired before the next season.

Becher said looking outside the organization will bring a fresh perspective, but the organizational philosophy of trying to compete every year remains in place.

”By definition a new GM will have new ideas. But certain things are core to who we are as a franchise,” Becher said. ”We’re a cap team. We’re going to spend to the cap, not to the bottom. We’re focused on making the playoffs every single year and competing for the Cup, not tanking for picks. We’re going to keep our picks, grow the prospect pool, get younger. So those fundamental things you’ve heard us say over the last year remain true.

Wilson’s departure comes near the end of a season that will likely end with San Jose missing the playoffs for a third straight season for the first time in franchise history. The Sharks opened the day with a 29-32-9 record and are 16 points out of a playoff spot.

But that was far from the case for almost the entirety of Wilson’s tenure as the Sharks won the third-most regular-season games and second-most playoff series during Wilson’s run.

The Sharks made it to the conference final in his first season on the job in 2004. Then after a lockout canceled the 2004-05 season, Wilson built the Sharks into one of the NHL’s model franchises starting with the trade that brought Joe Thornton to San Jose.

The Sharks made the playoffs in 14 of Wilson’s first 15 seasons with five trips to the conference finals and the franchise’s only Stanley Cup Final appearance in 2016 when San Jose lost to Pittsburgh in six games.

Despite not having high draft picks most years, Wilson built the perennial contender by drafting foundation players such as Joe Pavelski, Logan Couture, Tomas Hertl and Marc-Edouard Vlasic and brought in veteran stars such as Thornton, Brent Burns, Dan Boyle and Erik Karlsson along the way.

”Doug and his staff produced remarkable results over a span that very few NHL teams can match,” Plattner said in a statement.

Wilson, 64, played for the Sharks in their inaugural season in 1991-92. The longtime NHL defenseman who won the Norris Trophy in 1981-82 was inducted into the Hockey Hall of Fame last year.

More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP-Sports