Dmitry Balandin of Kazakhstan snatched a shock victory in the men's 200 metres breaststroke on Wednesday as the Central Asian country grabbed two Olympic gold medals in the space of an hour.
Balandin, swimming in an outside lane after qualifying as the slowest of the eight finallists, touched the wall in two minutes, 7.46 seconds, just 0.07 seconds ahead of Josh Prenot of the United States.
Russia's Anton Chupkov took the bronze, with 0.24 seconds separating the top three.
In swimming finals, the fastest qualifiers take the central lanes four and five, and a win in the outside lane is a rarity.
Japan's Yasuhiro Koseki had seized control of the race from the outset leading until the 150-metre mark and well under world record pace before he tied up over the final lap.
Koseki finished fifth, behind Briton Andrew Willis, who was unable to overhaul the leading trio.
Kazakhstan, who lost five Olympic titles from 2008 and 2012 through retrospective doping positives, had earlier won their first gold of the 2016 Games when Nijat Rahimov broke the clean and jerk world record in the men's 77kg weightlifting.
In the night's other men's final, there was also somewhat of an upset as Australia's Kyle Chalmers upset the two favourites to take 100m freestyle gold.
The 18-year-old got up best in a blanket finish to win from Pieter Timmers of Belgium in a time of 47.58 seconds.
Nathan Adrian of the United States, the fastest qualifier and defending Olympic champion, took the bronze medal.
Trailing seventh at the turn, Chalmers powered through the field in the last 50 metres, recording a split of 24.44 seconds for the second lap to become the first Australian man to win the event since Mike Wenden in 1968 at Mexico City.
Only 0.83 seconds separated all eight men, as the spray flew in the final drive for the wall.
"It's not sinking into me that I've actually won, so I'm very excited," Chalmers told reporters.
"I was next to the reigning Olympic champion. Although it was pretty daunting, I loved every second of it."