Michael Phelps held off a late challenge from Japan's Masato Sakai in the men's 200 metre butterfly final at Rio 2016 to claim his 20th Olympic gold medal.
Having reeled in early pacesetter Laszlo Cseh by the second turn, the most successful Olympian of all time looked to be heading for a comfortable victory on Tuesday
Despite Sakai's late and unexpected surge, Phelps clung on for a record-extending gold and his 24th Olympic medal in all.
Chad Le Clos, who famously beat Phelps to gold in 2012, finished outside the medals in fourth, with bronze going to Hungary's Tamas Kenderesi. Reigning world champion Cseh tailed off badly in the second half of the race and came home seventh.
Phelps lost by 0.05 seconds to le Clos in the event four years ago and swam next to his South African rival on Tuesday.
Phelps was first at the halfway mark and used his low-in-the-water stroke to hang on for the win with a time of one minute and 53.36 seconds.
He becomes the first swimmer to win four medals in the same individual event in Olympic history.
Phelps was visibly satisfied after the race, giving the fans a finger wag as a crowd featuring the American men's basketball squad showed their appreciation.