Updated

Australia's James Magnussen was the favorite heading into the men's 100m freestyle and Yannick Agnel of France had looked like the best sprinter of the 2012 Olympics. But the American, Nathan Adrian, staged a massive upset by one of the slimmest margins in Olympic history to win gold.

Adrian beat Magnussen at the wall by a mere .01 seconds, 47.52 to 47.53, and won America's first gold medal in the event since 1988.

Brazil's Cesar Cielo led at the 50-meter mark, but faded as Magnussen took charge shortly after the turn. Adrian ran him down in the last 25 meters, however, catching him at the last moment and winning by about a fingertip, the same margin that Michael Phelps beat Milorad Cavic by in the memorable 200m butterfly in the 2008 Olympics.

Canada's Brent Hayden took third in 47.80. Agnel was fourth at 47.84. Cielo, the world record-holder in the event, finished in sixth.

For more on the Olympics, check out SB Nation's London 2012 Olympics Hub. For more on Olympic swimming, follow the 2012 Olympic swimming section.