It took 22 years, but former Montreal Canadiens left-winger Steve Begin has finally obtained his high school diploma.

The ex-player received his certificate personally from Quebec Education Minister Jean-Francois Roberge Thursday at a ceremony alongside six other students at the Bell Centre, home of the National Hockey League's Canadiens.

Begin, 40, says it was his friend, UFC champion and fellow Quebecer Georges St-Pierre, who challenged him to finish his studies.

The former number 22 with the Habs says that despite making close to $7 million in his career and starting a civil engineering company after retirement, there was always something missing.

Begin used the online education platform, ChallengeU, to complete free French and English classes in order to graduate.

The left-winger played 524 games in the NHL between 1997-2013 and scored 56 goals and 108 total points. He played for Calgary, Montreal, Dallas, Boston and Nashville.