Ken Hitchcock wasn't sure how long he would coach the Dallas Stars the second time around after 15 years away.

Turned out to be one season.

The coach who led Dallas to its only Stanley Cup championship retired Friday, ending a 22-year career as the third-winningest coach in NHL history. The 823 wins are behind only Scotty Bowman (1,244) and Joel Quenneville (884). He's fourth in total games with 1,536.

The 66-year-old Hitchcock will become a consultant for the Stars.

"I have contemplated this since our last game and I came to the conclusion that now is the right time to step away and let the younger generation of coaches take over," said Hitchcock, who last year signed a multiyear contract that included the stipulation of becoming a consultant when he was finished coaching.

Hitchcock returned to Dallas after 14 seasons elsewhere, including stops in Philadelphia, Columbus and St. Louis. General manager Jim Nill hoped Hitchcock could get the Stars back to the playoffs, but a late-season slump kept them out for the second straight year and the eighth time in 10 seasons.

"We were honoured to have Ken as our head coach and it was fitting that he finished his coaching here," Stars owner Tom Gaglardi said. "He is a certain Hockey Hall of Fame coach and he left a lasting legacy wherever he went."

The Stars went to the Stanley Cup Final in consecutive seasons, beating Buffalo for the title in 1999 before losing to New Jersey in six games. Those are the only times Hitchcock or the Stars have made it to the final.

Dallas also won five straight division titles under Hitchcock, who was fired from his first head-coaching job with the team sliding in January 2002. He coached the Flyers from 2002-06, followed by the Blue Jackets (2006-10) and the Blues (2011-17).

St. Louis made the playoffs in each of Hitchcock's five full seasons, reaching the Western Conference finals in 2016 after beating top seed Dallas in seven games in the second round. The Blues abruptly fired Hitchcock in February last year, cutting short what was already going to be his last season with the Blues after their fifth loss in six games.

"To each and every player that I coached, I wish I could do it all over again," said Hitchcock, a Canadian whose record is 823-506 with 88 ties and 119 losses in overtime or a shootout. "You guys were the main reason for the all the wins, and I enjoyed coaching each and every one of you."

Nill turned to Hitchcock when the Stars had 79 points, their second-fewest in a full season since moving Dallas in 1993-94, in the last of four seasons under Lindy Ruff.

Led by high-scoring forwards Jamie Benn and Tyler Seguin and one of the top-scoring defencemen in John Klingberg, the Stars were solidly positioned for the playoffs in March before an eight-game losing streak that started with six losses on the road.

Hitchcock's playoff record is 86-82, and he also has an extensive background with Team Canada, which is where he forged a relationship with Nill. In Detroit, Nill was still an assistant GM when Hitchcock was a guest coach on Mike Babcock's staff during training camp in 2010.

"He poured his whole life into better understanding in-game concepts and strategy, inspiring players and enhancing teams," Nill said. "He leaves an indelible mark on the game, and his influence will be felt across the sport for years to come."