Singapore's Joseph Schooling competed against decorated US Olympian Michael Phelps in the qualifying heats for the Rio 2016 100m butterfly stroke semi-finals.
Schooling took first place, clocking in 51.41s, while Phelps came in second with a time of 51.60s.
Schooling went on to top the main event and made Singaporean history on Friday by becoming its first-ever male swimmer to qualify for an Olympic final.
"I feel fine. A little short on stroke but doesn't really matter that much - it was all about posting a good enough time to get into top eight," the 21-year-old Singaporean told reporters in Rio.
"I'm all about winning medals. I don't care if I break the world record but I get silver or bronze - I still lost. It's all about winning the gold."
Singapore's champion has now qualified for the finals and will swim for the gold in the men's 100m butterfly final on 13 August.
'Our flying fish'
The swimmer has earned admiration back home from several politicians as well as his fellow countrymen, who have been flooding social media with praise for its national swimmer.
"Well done! We are so proud of you," wrote May Chua on Facebook. "This is the first time I've ever felt so proud of Singapore making it to the finals of the Olympics."
"Our flying fish - national pride and joy. Show the world Singapore's swimming skills," said another Singaporean Richard Khoo.
"Set your alarms for Saturday, one of our very own is on his way to Olympic glory," commented another.
Singaporean President Tony Tan congratulated the swimmer on his exciting performance.
"We often underestimate the years of hard work and preparation because a race like the 100m fly concludes in just under a minute, barely a blink of an eye. I look forward to seeing Joseph compete against the best in the world tomorrow."
But to many Singaporeans, it was all about the emotions of seeing Schooling meet his childhood idol back in the Olympic swimming pool - eight years after they first met.
Many on Facebook shared memes and photos of the swimmers' meeting in 2008.
"[This must have been playing out] in Joseph's mind: Doesn't matter if I win or lose, it was an honour to compete in Olympic swimming besides my childhood idol," said Koyuki Everdeen.
"I can really see that he put in a lot of hardwork and effort. And that's why he won first place."
Keith Power said: "Just shows the influence sports stars can have on impressionable young minds. He was obviously inspired - well done Joseph!"
Oli To thinks it must have been "a dream come true" for the Singapore swimmer.
"To swim and compete with Michael Phelps, Joseph is a winner and world-class whether he wins an Olympic medal or not."
"Their difference in timing was only a fraction of a second," he noted.
Reporting by the BBC's Heather Chen in Singapore.