Quebec Remparts coach Patrick Roy puts his squad through hockey practice in Moncton, New Brunswick. The Colorado Avalanche announced Thursday that they hired Patrick as their new head coach.

DENVER — Hall of Fame goalie Patrick Roy is returning to the Colorado Avalanche as their head coach.

The team reached an agreement in principle Thursday with Roy to lead the Avs and also gave him the title of vice president of hockey operations.

Roy will join forces with former teammate Joe Sakic, who was recently promoted to executive vice president of hockey operations. The Avalanche won two Stanley Cup titles with the duo on the ice and the organization is hoping they can help turn around a downtrodden team.

The Avs are coming off a season in which they finished last in the Western Conference and missed the playoffs for a third straight season. The dismal season led to the dismissal of coach Joe Sacco late last month.

The 47-year-old Roy becomes the sixth coach in Avalanche history and the 14th in franchise history; the team began as the Quebec Nordiques and moved to Denver before the 1995-96 season. The team won the first of two Stanley Cup titles that season, with Roy in net.

Roy has spent the last eight seasons as coach and general manager of the Quebec Remparts of the Quebec Major Junior Hockey League, winning the 2006 Memorial Cup. He also is a part-owner of the QMJHL franchise.

“This is an unbelievable day for me,” Roy said. “It’s a new and exciting challenge that I am really looking forward to. Almost 10 years to the day that I announced my retirement as a player I am back in Denver and hope the fans are as excited as I am.”

Roy’s younger brother, Stephane Roy, let the secret out earlier this week, posting a Facebook note saying his brother would be the new coach. Fans in the Mile High City have been enthralled all week, hoping two of the most beloved players in team history would team up again.

“This is a very exciting day for our fans and a significant moment in our organization’s history,” team president Josh Kroenke said.

Following the season, the Avalanche shook up their front office, naming Kroenke as their team president and giving Sakic more of a say in every day hockey decisions.

Sakic’s first task was to find the next coach.

Naturally, he turned to someone he knows quite well.

“All along Patrick was our top candidate and we are thrilled that he has decided to accept this offer,” Sakic said. “Patrick has a great hockey mind, is a tremendous coach and there is no one more passionate about this game. He will bring that winning attitude to our dressing room to help this young team grow.”

Roy was inducted into the Hockey Hall of Fame in 2006. He retired with the most regular-season wins in NHL history (551), since passed by New Jersey’s Martin Brodeur.

Roy also won two Stanley Cups with Montreal and remains the winningest goalie in Stanley Cup history with 151 postseason victories.

“Patrick’s passion for the game of hockey both as a player and as a coach defines who he is as a person,” Kroenke said. “He is a winner and is coming back to Denver, where he created numerous special moments on and off the ice while helping lead us to two Stanley Cup championships.”

Roy won three Vezina Trophies (1989, 1990, 1992) and was selected to the NHL All-Star team six times.