Controversial Russian swimmer Yulia Efimova was beaten to Olympic gold by Lilly King of the USA in the women’s 100m breaststroke.
Efimova, 24, was allowed to compete at Rio after successfully appealing against a doping suspension.
She arrived to boos before losing to King, who swam an Olympic record of one minute 4.93 seconds.
Efimova was banned for 16 months in 2013 after traces of an anabolic steroid were found in her system.
The International Olympic Committee had ruled any Russian athlete who had been sanctioned for doping would be banned from competing in Rio, but Efimova appealed to the Court of Arbitration for Sport (Cas).
Earlier this year she was given a provisional ban after testing positive for meldonium, but the International Swimming Federation lifted the suspension after advice from the World Anti-Doping Agency (Wada).
Cas has ruled that athletes cannot be banned from Rio solely on the basis that they have been previously sanctioned.
There had appeared to be some aggravation between King and Efimova in the build-up to the final.
After winning the first semi-final on Sunday, Efimova celebrated by wagging her finger. King, who performed the same move earlier in the day, was captured on television watching Efimova. She then waved her finger in response.
After winning gold, King said: “It just proves that you can compete clean and still come out on top with all the work you put in.
“There is a way to become the best and do it the right way.”
Meanwhile, James Guy narrowly missed out on Great Britain’s first Olympic 200m freestyle medal after finishing fourth in the Rio final.
Fellow Briton Siobhan-Marie O’Connor gave herself a chance of winning a medal on Tuesday as she set a British record of 2:07.57 to win the first women’s 200m individual medley semi-final.
Guy, who won the 2015 world title, was just 0.26 seconds off a podium finish.
China’s Sun Yang won gold in a time of 1:44.65, ahead of South Africa’s Chad le Clos and American Conor Dwyer.
Sun, 24, also won silver in the 400m freestyle on Saturday, but he is a divisive figure after serving a three-month doping ban in 2014 and being jailed for driving a car without a licence in 2013.
Some spectators booed as Sun, who won silver in this event at London 2012, stepped on to the podium during the medal ceremony.
Le Clos returned to the pool later in the evening to resume a rivalry with 19-times Olympic gold medallist Michael Phelps in the men’s 200m butterfly semi-final.
Hungary’s Tamas Kenderesi beat them both as Phelps qualified second and Le Clos fourth to progress to Tuesday’s final.
Kenderesi’s compatriot Katinka Hosszu became the first multiple gold medallist of the Games as she won the women’s 100m backstroke.
The 11-time world champion followed up her dominant win in the 400m individual medley by beating USA’s Kathleen Baker with a time of 58.45 seconds.
Hosszu has a packed schedule in Rio, having entered a total of seven events. Not long after winning gold she returned to the pool to qualify quickest in the second women’s 200m individual medley semi-final.
Finally, American Ryan Murphy set a new Olympic record to win gold in the men’s 100m backstroke.
Murphy, 21, claimed victory in a time of 51.97 seconds, with China’s Jiayu Xu winning silver and Murphy’s team-mate David Plummer taking bronze.