It was a night of records in the Rio 2016 pool on Sunday as Michael Phelps added to his Olympic gold medal haul.
Three world records were set: Katie Ledecky in the women's 400m freestyle, Adam Peaty in the men's 100m breaststroke and Sarah Sjostrom in the women's 100m butterfly.
But the biggest cheer of the night from the capacity crowd at the Olympic Aquatics Center was reserved for the final race: the 4x100m men's freestyle, featuring the most successful Olympian in history.
Phelps teamed with Caeleb Dressel, Ryan Held and Nathan Adrian to win the event in 3 minutes 9.92 seconds, ahead of second-placed France by 0.61sec. Australia took bronze, 1.45sec behind the USA.
Phelps swum the second leg in 47.12sec. His reaction time of 0.08sec was the quickest of the race. It was the American's 19th Olympic gold medal and his first of the Rio Games.
The 31-year-old is aiming to become only the third athlete to win gold in the same event at four consecutive Olympics, joining Al Oerter (discuss) and Carl Lewis (long jump). He could perform the feat in both the 100m butterfly and 200m individual medley.
Earlier, teenage sensation Ledecky blitzed the field to win gold in the women's 400m freestyle.
The 19-year-old touched the wall in 3:56.46, eclipsing the record she set in 2014 by almost two seconds.
"It feels really good. I'm pumped," Ledecky said. "I felt good throughout. The swim was almost identical to this morning, but with a bit more pop on the last lap. It's pure happiness."
Britain's Jazz Carlin was second, 4.77sec behind Ledecky, with the USA's Leah Smith 5.46sec adrift in third.
Ledecky won one gold medal as a 15-year-old at the London 2012 Olympics, triumphing in the 800m freestyle. She was part of the USA team that won silver in the 4x100m relay final on Saturday.
Britain Peaty shattered his own world record to win the men's 100m breaststroke final. The 21-year-old finished in 57.13sec to beat the mark he set in Saturday's heats by 0.42sec.
Republic of South Africa's Cameron Van Der Burgh took silver in 58.69sec and the USA Cody Miller clinched bronze in 58.87sec.
Sweden's Sjostrom also smashed her own world record to clinch gold in the women's 100m butterfly. Sjostrom clocked 55.48sec to beat her previous mark of 55.64sec set at the world championships in Kazan last year.
"The feeling is totally crazy," Sjostrom said. "I didn't realize it was a world record. I knew I was the big favourite. I was under pressure, so I tried to focus on no disasters."
"Before the start I said to myself it's just a pool. It's nothing. I know what to do. I was not so nervous, I was in a good mood today. I knew the 100m butterfly was my big chance."
Canada's Penny Oleksiak took silver in 56.46sec and the USA's Dana Vollmer grabbed bronze with a time of 56.63sec.
China's Lu Ying and Chen Xinyu finished fourth and fifth respectively.
Despite four world championship titles, Sjostrom had previously never won an Olympic medal. Her best finish before Sunday was fourth in this event at the London 2012 Games.
China's Sun Yang qualified fastest for the men's 200m freestyle final, easily winning his semifinal. The 24-year-old clocked 1 minute 44.63 seconds, 0.82sec ahead of Japan's Kosuke Hagino. The USA's Conor Dwyer was third in 1:45.55 reportsÂ Xinhua.