China's Li Xuerui completed her dream run at Wembley Arena by outbattling her illustrious compatriot Wang Yihan to claim Olympic gold.
The 21-year-old failed to convert two match points in the second game but managed to summon enough energy to clinch a draining women's singles final 21-15 21-23 21-17.
Wang, the world champion and world number one, had long seemed destined for the top prize but third seed Li's form throughout the week had suggested she could cause an upset.
Li only burst onto the scene in the months leading up to London 2012 and was a late addition to the Chinese team.
Her selection has been fully justified but she needed to dig deep to see off Wang in a match that lasted 78 minutes.
The youngster started superbly, showing great control and deception and rarely missing a winner to open up a 19-9 lead in the opening game.
But she had difficulty closing the opener out as Wang rallied and that set the scene for a far more tightly-contested second game.
The lead changed hands several times before Li edged ahead to twice put herself within one point of gold. She was unable to convert as Wang clawed back the deficit to take the match to a decider.
With both players looking very tired the error count grew. Initially that allowed Li to move 8-3 ahead but Wang recovered to 17-17.
Yet there was to be another twist as Li pulled out the final four points in quick succession to complete victory.
Injury
China were denied all three podium positions after an unfortunate injury to second seed Wang Xin in the bronze medal match.
Wang jarred her knee late in the first game against fourth seed Saina Nehwal and play was delayed for her to receive treatment.
She picked herself up to win the point that secured the first game and then won the opening rally of the second but collapsed moments later.
It soon became apparent the match would not continue and Nehwal was awarded the match with the score 21-18 1-0 against her.
That meant India had their first Olympic medal in badminton but Nehwal respectfully did not celebrate as she left court.