Viktor Axelsen held his nerve to win his first badminton world championship at the expense of his idol, the great Lin Dan on Sunday.

Denmark's Viktor Axelsen reacts after winning gold in the mens singles final on day seven of the 2017 BWF World Championships at the Emirates Arena in Glasgow, Scotland, Sunday Aug. 27, 2017. (Jane Barlow/PA via AP)

Denmark's Viktor Axelsen reacts after winning gold in the mens singles final on day seven of the 2017 BWF World Championships at the Emirates Arena in Glasgow, Scotland, Sunday Aug. 27, 2017. (Jane Barlow/PA via AP)

When five-time champion Lin's backhand couldn't retrieve a smash, Axelsen won their final 22-20, 21-16 and turned to his coaches with shock on his face and his hands on his head.

"Lin Dan is an idol for me, it's just unreal," said the first male champion from Europe in 20 years.

China's Lin Dan competes against Denmark's Viktor Axelsen during the mens singles final on day seven of the 2017 BWF World Championships at the Emirates Arena in Glasgow, Scotland, Sunday Aug. 27, 2017. (Jane Barlow/PA via AP)

China's Lin Dan competes against Denmark's Viktor Axelsen during the mens singles final on day seven of the 2017 BWF World Championships at the Emirates Arena in Glasgow, Scotland, Sunday Aug. 27, 2017. (Jane Barlow/PA via AP)

The women also produced a first-time winner. Nozomi Okuhara beat Pusarla Sindhu of India with a cross-court drop shot to finish the longest match of the championship and one of the greatest finals in badminton history.

Japan's Nozomi Okuhara reacts after winning gold in the women singles final on day seven of the 2017 BWF World Championships at the Emirates Arena in Glasgow, Scotland, Sunday Aug. 27, 2017. (Jane Barlow/PA via AP)

Japan's Nozomi Okuhara reacts after winning gold in the women singles final on day seven of the 2017 BWF World Championships at the Emirates Arena in Glasgow, Scotland, Sunday Aug. 27, 2017. (Jane Barlow/PA via AP)

With both players almost dead on their feet after nearly two hours, Okuhara won the gripping final 21-19, 20-22, 22-20 to become the first women's singles champion from Japan.

"I am very tired," she said.

Axelsen won the junior world title in 2010, but expectations of him cooled as he failed to produce a breakthrough win. He was third at the Olympics last year and won the World Superseries Finals in the absence of the resting big names. The breakthrough finally came this week, as he brushed aside Olympic, world and Asia champion Chen Long in the semifinals, and dismissed Lin without dropping a game to either Chinese star.

India's Pusarla Sindhu competes in the women singles final on day seven of the 2017 BWF World Championships at the Emirates Arena in Glasgow, Scotland, Sunday Aug. 27, 2017. (Jane Barlow/PA via AP)

India's Pusarla Sindhu competes in the women singles final on day seven of the 2017 BWF World Championships at the Emirates Arena in Glasgow, Scotland, Sunday Aug. 27, 2017. (Jane Barlow/PA via AP)

He saved a game point for Lin in the first game of the final with a smash down the line, earned game point himself, and took it when Lin hit long.

In the second game, Lin was strangely passive, and Axelsen ripped ahead 18-11. With yet another smash of another defensive return by Lin, Axelsen had four match points and converted the first.

"If you could see me on the inside, I was shaking," Axelsen said. "In the second game I kept telling my coaches, 'I am so nervous right now.'"

It was Lin's first loss in a worlds final since his first, 12 years ago.

Sindhu, tall with a significant reach and two previous world bronze medals, started the final appearing stronger. But the smaller, speedy Okuhara suddenly found another gear and edged the first game.

Every rally seemed to be played as if it was match point, as they pushed each other to all corners; Sindhu patiently waiting for a floater to smash, and Okuhara bashing at Sindhu's forehand side to set up a drop shot winner.

In the second game, Okuhara saved three game points by forcing errors; they played 33 shots for 20-20. On Sindhu's fourth game-point, she won after a rally lasting 73 shots. The gasps from the crowd grew louder and louder until Okuhara batted the shuttle into the net and collapsed on the floor. Sindhu bent over, too tired to acknowledge the crowd's standing ovation.

Both players showed signs of fatigue in the third, but as tired they were, neither would concede. The rally for 13-13 went 42 shots.

Okuhara was first to match point, but wasted it when she let a Sindhu shot sail past, and watched it fall in. Sindhu netted to give Okuhara a second match point, and the Japanese opened the court to make a drop-shot winner.