Twelve-time Olympic medalist Ryan Lochte is one race away from qualifying for the Tokyo Olympics, potentially his fifth Games. 

Lochte, 36, went 1:58.65 in Thursday night's 200-meter individual medley semifinals at the U.S. Olympic Swimming Trials, finishing in sixth place and advancing to Friday night's final. The winner is guaranteed an Olympic berth and qualification is likely for the No. 2 finisher. 

The 200 IM is Lochte's signature event -- he's the current world record holder with a time he set a decade ago that's gone largely without a scare since. In fact, no one other than Michael Phelps has ever come within a second of Lochte's 1:54.00.

Lochte has been under 1:55 eight times in his career, but hasn't broken 1:57 since Rio 2016. Asked whether he could have a faster swim in him tomorrow, Lochte told NBC's Michele Tafoya: "Oh, 100%. There's no such thing as perfect races and there's a lot I've got to improve on, especially that race. That just was not a good one."

Lochte's return to an Olympics would have been improbable enough from a sheer age and performance perspective. He'll be the oldest man to ever make the U.S. Olympic Swim Team if he pulls it off. But he's also spent a combined total of two of the last five years suspended from competition. 

USA Swimming handed Lochte a 10-month ban in response to the infamous Rio gas station incident, then another 14 months after Lochte posted a photo of himself receiving an IV infusion. Though the infusion was of vitamins and not any illegal substances, it goes against U.S. Anti-Doping Agency policy for athletes to get IV infusions without hospitalization or an approved exemption. 

After accepting his second ban, Lochte pledged to keep going in the sport. 

While Lochte -- who now has two young children -- will have to fight for his storybook ending on Friday, you couldn't script a more intriguing final chapter. He'll be going head-to-head with former youth phenom Michael Andrew, Lochte's swimming antithesis in most ways, and the 2017 world champion in the event, Chase Kalisz. Andrew went 1:55.26 in the semifinal, the fastest time in the world this year. 

Both of the much-younger swimmers are already qualified for Tokyo. Lochte finished 25th in prelims of the 200 free earlier this week, scratched his mid-week events, and remains entered in the 100 butterfly (where he's the No. 38 seed).