Updated

Michael Phelps surged to win the 100-meter butterfly Friday night, his last individual race in what he swears is his last Olympics.

Phelps was seventh at the turn, but kicked it into gear over the last 50 meters to beat South Africa's Chad le Clos and Russia's Evgeny Korotyshkin by .23 seconds. Le Clos and Korotyshkin shared silver.

Phelps won his 21st Olympic medal and 17th gold, extending both records.

The 100 fly is the race Phelps won famously by .01 seconds with a half-stroke at the end over Milorad Cavic at the Beijing Olympics four years ago.

Phelps became the first male swimmer to win the same Olympic event three straight times when he beat Ryan Lochte in the 200 individual medley on Thursday night.

He has now also won he 100 fly three straight times.