Ray Whitney, who spent 22 seasons playing in the NHL and won a Stanley Cup with the Carolina Hurricanes in 2006, announced his retirement Wednesday.

"For the past 23 years I have had the privilege of earning my living playing hockey in the National Hockey League," Whitney said in a statement released by his agency, CAA Sports. "Along the way I have made countless memories and friendships, which I will always cherish. Every city I played in, the fans welcomed my family and me with open arms, and I couldn’t be more thankful for that."

Whitney was selected by the San Jose Sharks in the second round (No. 23) of the 1991 NHL Draft and made his NHL debut with San Jose on April 15, 1992.

In 1,330 NHL games with eight teams, Whitney had 385 goals and 1,064 points. He was selected to two NHL All-Star Games.

In 2005 Whitney signed with the Hurricanes and ended the 2005-06 season lifting the Stanley Cup.

Whitney last played for the Dallas Stars during the 2013-14 season, with his final regular season game April 3, 2014 against the Hurricanes in Raleigh, N.C.

"I also wanted to take this opportunity to thank all of my teammates and coaches, especially the 2006 Stanley Cup team in Carolina," Whitney said. "I was lucky to have great agents at CAA Sports who stood by me through the good times and the tough times. I want to say a special thank you to my parents, who gave me the chance to do what I loved."

The #Coyotes would like to congratulate Ray Whitney on an incredible career. Enjoy your retirement in AZ Wizard! pic.twitter.com/Ak8S1B9IsA — Arizona Coyotes (@ArizonaCoyotes) January 21, 2015

What a career from #TheWizard! Proud to have started out in the league together! Congrats Ray! pic.twitter.com/VNbCgKf1el — San Jose Sharks (@SanJoseSharks) January 21, 2015