Sun Yang responded to taunts about his doping history in emphatic fashion on Monday by becoming the first Chinese swimmer to win the Olympic men's 200 meters freestyle gold medal.
Sun, silver medalist in the event in London four years ago, touched the wall in one minute, 44.65 seconds to beat South Africa's Chad Le Clos by 0.55 seconds.
It was Sun's second medal of the Games after his silver in Saturday's 400 free.
Conor Dwyer of the United States won bronze.
France's Yannick Agnel, who won gold in London four years ago, was absent after being eliminated in the heats.
Monday's victory was the third gold of Sun's Olympic career, and sixth medal, adding to the 400 and 1,500 meters titles he won in London.
Britain's world champion James Guy, whose room mate Adam Peaty stormed to breaststroke gold on Sunday and ended his country's 28 year wait for a male Olympic swimming champion, finished fourth.
In his delight at winning, Sun took off his swimming cap and attempted to throw it to Chinese supporters in the crowd above him, but it landed in the pool and he had to retrieve it.
It was not his first misstep of a controversial week that has seen a splashing incident in training escalate into a battle conducted via the media between him and his Australian rivals.
A Chinese state newspaper described Australia as "uncivilized" and "Britain's offshore prison" as it rushed to Sun's defense after he was labeled a drugs cheat by Australian 400 freestyle gold medalist Mack Horton.
Sun was revealed two years ago to have secretly served a three-month suspension for using a banned stimulant.
He said it was medication to treat a heart issue and did not enhance performance.
Murphy maintains US streak in 100m backstroke
Ryan Murphy won the men's 100 meters backstroke gold at the Rio Olympics to extend the US run of domination in the event to six successive Games dating back to Atlanta in 1996.
China's Xu Jiayu took the silver and David Plummer, making his Games debut at the age of 30, the bronze for the United States.
The 2012 champion in the event, Matt Grevers, was unable to defend his title after failing to qualify at the US trials.
King denies Efimova in 100m breaststroke
Lilly King of the United States won the Olympic gold medal in the women's 100 metres breaststroke, denying Russia's Yulia Efimova who was greeted with resounding boos from the Rio de Janeiro crowd.
Katie Meili of the United States took the bronze, with London 2012 champion Ruta Meilutyte of Lithuania fading in the second length to finish seventh.
There were loud jeers before the start of the race for Efimova, who has twice been suspended for doping offences.
The 24-year-old world champion won a legal challenge last week to get herself reinstated to the Olympics, having previously been excluded because of her doping record.
She was one of several Russians who successfully argued that having served their suspensions, they should not be punished again for the same offence by being barred from Rio.
King swam a strong first 50 metres and led at the turn, with Efimova well back in fourth place.
The Russian surged forward in the second half of the race and appeared to be catching her rival, but King finished powerfully in an Olympic record time of one minute 4.93 seconds, with Efimova 0.57 seconds behind.
Before leaving the poolside, the American patted the Russian on the back.
The margin was more comfortable than in the heats and semi-finals, where King had beaten her rival by 0.01 and 0.02 seconds respectively. Efimova was also jeered at both those swims.
Revelations of state-sponsored Russian doping overshadowed the build-up to the Olympics and led to more than 100 competitors being excluded, including the country's entire athletics and weightlifting teams.
Russia was banned on Sunday from the Paralympics that will follow.
Efimova only learned last Friday that she could compete, and officials were forced to reissue the start lists to include her for the breaststroke events.
She was banned between October 2013 and February 2015 after testing positive for traces of the anabolic steroid DHEA, and also briefly suspended after testing positive for meldonium this year.