Valencia swimmer Anthony Ervin wins gold in Rio

Anthony Ervin of the United States celebrates winning gold in the Men's 50m Freestyle on Day 7 of the Rio 2016 Olympic Games. Clive Rose/Getty Images

The unlikeliest part of Anthony Ervin's gold medal win at the Rio Olympics isn't his hometown of Valencia. After all, Southern California has produced plenty of champion swimmers. It's his age.

At 35, most of his compatriots have long since stopped swimming competitively. But Ervin isn't most swimmers.

As a 19-year-old, he won gold in the 50-meter freestyle in the 2000 Sydney Olympics. A few years later, he walked away from the sport. The hiatus lasted eight years and included battles with addiction, a period of homelessness and a suicide attempt.

He wrote about his struggles in his recent memoir, "Chasing Water: Elegy of an Olympian."

Ervin only began training again in 2011. The following year, at the London Olympics, he placed fifth in the finals of his signature event.

If the 2012 Sydney Olympics were a disappointment, Rio has offered redemption.

On Friday, Ervin won the  men's 50-meter freestyle swim, making him the oldest male swimmer to win an individual gold medal at any Olympics.

As a kid, Ervin swam at the Canyons Aquatic Club and competed at Hart High in Newhall before heading up to UC Berkeley to become an NCAA star.

Ervin tells our media partner NBC 4 about what it took to win the men's 50-meter freestyle swim in Rio.

"Obviously there's a big difference between teenage me winning a gold medal and me being … basically a full grown adult even if I may not act like it all the time. It feels good, I'm just glad my people were here to share the experience with me."