America's Nathan Adrian won gold in the men's 100m freestyle by 0.01 seconds ahead of Australia's world champion James Magnussen.
In a thrilling race, the 23-year-old was third at 50m but then turned on the power to pip the pre-race favourite in 47.52 seconds.
"That was fascinating to watch. I was riveted for the last 10m. Nathan Adrian just digs his head down and must have been in so much pain but just shut down the feeling, I'd imagine. Magnussen is left thinking about his career. Nathan Adrian was strong today."
Canada's world silver medallist Brent Hayden finished third.
"This comes every four years and I knew I had to lay it all out on the line," Adrian told BBC Sport.
"I put that effort into my [United States] trials and I went 48.1, so with a little more rest I got a little faster."
France's Yannick Agnel,
who has already won gold in the 200m freestyle and 4x100m relay, finished outside the medals in fourth, while world record holder Cesar Cielo from Brazil finished sixth despite turning in the lead.
The gold for Adrian represents his first major title. For Magnussen, it will be a kick in the teeth after saying this was the race he was gunning for. He has yet to win a medal at the 2012 Olympics.
Australia, usually a dominant force in the swimming pool, have won one gold at the Aquatics Centre, winning the women's 4x100m freestyle relay.