South Africa’s Caster Semenya won Olympic gold in the 800m but Great Britain’s Lynsey Sharp missed out on a medal as she finished sixth.
Semenya set a new national record to win in one minute 55.28 seconds and finish well clear of silver medallist Francine Niyonsaba of Burundi.
Kenya’s Margaret Nyairera Wambui took the bronze medal, while Scot Sharp set a new personal best of 1:57:69.
Semenya, 25, has now won two Olympic medals, after a silver at London 2012.
There she finished behind Russia’s Mariya Savinova, who has since been named in a doping report, with the World Anti-Doping Agency saying she should receive a lifetime ban.
Four years on, Semenya finished more than a second clear of Niyonsaba to take the title.
Her time was two seconds adrift of the world record of 1:53:28, set by Jarmila Kratochvilova, running for Czechoslovakia, in July 1983.
"Every athlete’s dream is to win a medal, especially in the Olympics," said Semenya.
Semenya has faced continued questions over her eligibility to race after she was subject to gender testing after winning the world title in 2009.
She has since been diagnosed with hyperandrogenism, which means her testosterone levels are far in excess of the vast majority of women.
Semenya was cleared to compete by the International Association of Athletics Federations in 2010 after being sidelined for 11 months while she had tests.
New regulations requiring female athletes to take testosterone-lowering medication if their natural levels were above the legal mark were suspended for two years by the Court of Arbitration for Sport last July.
Read more: ’Semenya could be a victim of her own success’
"I have tried to avoid the issue all year," said Sharp.
"You can see how emotional it all was. It is out of our control. We rely on people at the top sorting it out.
"The public can see how difficult it is with the change of rule but all we can do is give it our best."
Former marathon world champion Paula Radcliffe:
"That is why Lynsey Sharp is getting so upset. However hard she goes away and trains, however hard Jenny Meadows goes and trains, they are never going to be able to compete with that level of strength and recovery that those levels of elevated testosterone brings.
"The big issue is, it is not cheating. Caster has done nothing to be in that situation and have those high levels.
"Either they take the medication to suppress the levels, which may affect how they are able to react and perform within races and training, or they choose to have an operation or they choose not to compete.
"It is not a situation they can come out of winning."