Malaysian badminton star Lee Chong Wei announced his retirement on Thursday, bringing an end to a bumpy career of highs and lows.

AFP Sport examines the moments that defined one of badminton’s greatest players:

Top man

Lee was jubilant when he first reached the top of the world rankings in 2006 at the age of 24, overtaking his great rival Lin Dan of China. Lee was to spend a total of 348 weeks as world number one, including 199 straight from August 2008 to June 2012 – arguably his finest achievement.

Nearly man

In August 2008, Lee reached the Olympic final in Beijing, raising hopes he would bring home Malaysia’s first Olympic gold medal. However, he was well beaten by Lin, who thrilled the home fans with a straight-games victory. It set an unfortunate pattern for Lee, who also lost to his nemesis in the 2012 final, and missed out again in the 2016 decider – this time to China’s Chen Long. Lee was also a runner-up in three world championship finals – against Lin in 2011 and 2013, and Chen in 2015 – and retires without winning either of the sport’s two biggest prizes.

Doping controversy

Lee’s career hit its nadir in 2014, when he tested positive for a banned anti-inflammatory at the world championships. Badminton authorities eventually accepted his explanation that he took the drug accidentally during stem-cell treatment for a thigh injury. But the incident sidelined him for eight months and sent him plunging down the world rankings.

Cancer diagnosis

A patchy season for Lee last year became a disaster when he was diagnosed with early-stage nose cancer in July. After intensive treatment in Taiwan, Lee resumed training in January. However, a return to full fitness eluded him and, with his hopes of reaching next year’s Olympics slipping away, Lee tearfully announced his retirement on Thursday.