GUANGZHOU, China (AP) — Lin Dan of China became the first man to win five world badminton championship singles titles Sunday as his archrival Lee Chong Wei retired on the brink of defeat in the final.

The left-handed Lin, considered the best player in the history of the sport, prevailed 16-21, 21-13, 20-17 over his top-seeded Malaysian adversary, whom he most recently beat in London last year for a second consecutive Olympic gold.

Lin committed a number of errors in the opening game but he made a dramatic comeback, taking a 12-1 lead in the second game which he won with ease.

The deciding game was more evenly fought but Lee looked troubled in the latter part and conceded the advantage to Lin, who also became the first ever wild card entrant to win at the world championships.

Lin needed a wild card because he had played only one tournament over the past year due to injuries and spending time with his family.

The top seed also lost the women's final, as Thailand's 18-year-old Ratchanok Inthanon became the youngest woman to win the title with a 22-20, 18-21, 21-14 victory over Li Xuerui of China.

Inthanon, who was the youngest-ever junior world champion at the age of 14 and won the world junior title for a record three times, faced stiff resistance in the first two games but ran up a 6-1 lead in the decider and maintained a comfortable lead.