Australian swimmer Mack Horton held off the challenge of 2012 champion Sun Yang over the final 50m to win the Olympic men's 400m freestyle.
Horton finished in a time of three minutes 41.55 seconds, as China's Sun took silver in 3:41.68 and Italy's Gabriele Detti won bronze.
Briton James Guy led for more than 250m before fading and finishing sixth.
"In the last 100m or so I could see Sun and Mack going past and I thought, 'Oh no'," Guy told BBC Sport.
"My family flew all these miles to see me swim, but my first 200m was pretty comfortable so it is good times for [the 200m] on Sunday."
Subscribe to the BBC Sport newsletter ↗ to get our pick of news, features and video sent to your inbox.