The Golden Knights agreed to terms Friday with the three-time Stanley Cup champion goalie on a three-year contract extension worth an average of $7 million a year.

Fleury had one year remaining on his contract. The extension would keep him with Vegas through the 2021-22 season, meaning the 33-year-old Fleury could end his career with the Golden Knights.

“This organization gave me a chance to play, to play a lot of games, they believed in me,” Fleury said during a news conference to announce the deal. “The success that we had over the season, winning always makes everything better. And then the fans, how much they supported us right from day one. They were crazy all season long and the playoffs were a lot of fun to play. We could really feel the intensity in the building from the fans.

“My family loves it. too. Great schools, great neighborhoods, lots to do for the kids and I feel very fortunate.”

The Golden Knights selected Fleury in the 2017 expansion draft from the Penguins. He won 29 games last season, including the 400th victory of his career. He registered the best statistical regular season of his career with a goals-against average of 2.24 and a save percentage of .927. He has 404 career wins in 737 games between Pittsburgh (691 games) and Vegas (46) and ranks 11th in victories in NHL history.

Fleury helped the Golden Knights to the Pacific Division title and an appearance in the 2018 Stanley Cup Final in their inaugural season. He appeared in all 20 games for the Golden Knights in the playoffs, where Vegas’ storybook season ended with a loss to the Washington Capitals in the Stanley Cup Final.

The three-time All-Star said getting the extension out of the way now eliminated distractions he’s experienced in the past.

“It’s always something I wanted and like to do, so when the season starts you’re not thinking about the rumors, where you can be traded to, I’ve been through that already,” Fleury said. “Just to have that security to be here for a long time was big for me.”

Just as he did at the time of the expansion draft, general manager George McPhee said he took the advice of goaltender coach Dave Prior to lock up Fleury.

“When we made the expansion draft play for Marc-Andre, our staff and Dave Prior believed that we could get him playing as well as he’s ever played and even better, and that’s exactly what happened,” McPhee said. “Dave went to work with Marc-Andre and Marc-Andre was open-minded and worked with Dave and had a terrific season.

“At Dave’s advice we thought a three-year extension was the appropriate extension in terms of time. Marc-Andre is a very athletic, very quick, very agile goaltender. Not one of the big, lumbering hit me goaltenders, and we could get four very good years from Marc. The deal was there to be done, so we thought it was the right time to do it.”