Four-time Olympic gold medalist Allison Schmitt is headed to a fourth Olympic Games. 

Schmitt finished second to Katie Ledecky in the 200-meter freestyle on Wednesday night at the U.S. Olympic Swimming Trials, going 1:56.79 -- at a minimum securing a potential 4x200 free relay spot, and likely earning an individual spot in the 200. Ledecky -- the Rio gold medalist -- went 1:55.11, Paige Madden was third in 1:56.80 and Katie McLaughlin was fourth in 1:57.16.

In her first Olympics in 2008, Schmitt won a bronze medal leading off the women's 4x200 free relay. At London 2012, Schmitt won gold individually in the 200 free and won golds on both the 4x100 and 4x200 free relays; she also took silver behind a young Ledecky in the 400 free. In Rio, where she was named a team captain, Schmitt earned a gold medal in the 4x200 free relay and a silver as a prelims swimmers for the 4x100 free relay. 

Schmitt, a close friend of Michael Phelps, has been open about her struggle with mental health since the 2012 Games. After Rio, Schmitt took a hiatus from swimming but never left the USADA drug-testing pool, indicating she wasn't yet done with the sport as her friend Phelps was. In April 2018, she made her comeback at the Pro Swim Series in Mesa, Arizona. 

"I'm excited and it was a great race. I'm excited to be going to Tokyo," an emotional Schmitt told NBC's Michele Tafoya after Wednesday's race. "It's been tough, but I have a very supportive crew behind me and we all made it through this year, and that's where these tears are coming from."