LONDON -- Chad le Clos had waited for this moment nearly all his life. As a 12-year-old boy in South Africa, he had watched the 2004 Athens Olympics on television, saw an American man named Michael Phelps win six gold medals, and decided right then and there that he would dedicate his life to becoming the greatest swimmer his body would allow.

In the years that followed, he worshipped the American swimmer. He read every article he could get his hands on. He cut out pictures of Phelps. He recorded and watched all of his idol's races, and then he'd watch them again.

So you can imagine the emotion Friday night -- le Clos walked onto the pool deck for the final swim of his 2012 Olympics, and the man walking in front of him was none other than Phelps, who was about to swim the last individual event of his career.

Chad le Clos, left, raced against his idol, Michael Phelps, for the second time these Games in Friday's 100 butterfly final. AP Photo/Jae C. Hong

Two nights earlier, le Clos had shockingly out-touched Phelps to beat him in the 200-meter butterfly, a race he hadn't lost at a major international meet since le Clos was 8 years old. After the race, he mentioned how excited he was to beat his idol. The next morning, when Phelps relayed the story to coach Bob Bowman, the two of them got emotional.

"It means Michael has done what he wanted to do, affect the sport of swimming," a watery-eyed Bowman said. "When he described that to me, he got choked up about it. So did I."

When he was just 15, Phelps stated his goals to agent Peter Carlisle. They had nothing to do with gold medals, world records or becoming the greatest swimmer ever. Instead, Phelps said he wanted to change the sport of swimming; he wanted to motivate, inspire and push people to chase their dreams.

The blond-haired, 20-year-old le Clos was the result of that goal. On Friday night, as he walked onto the pool deck with his idol for the last time, le Clos couldn't stop thinking about his place in this special moment.

"I just kept thinking I wanted to be up there on that podium," he said. "I wanted to be in that race with him. I wanted to give him a run for his money. I wanted to make him proud."

At the halfway point of the 100 butterfly, Phelps was seventh and le Clos eighth. It didn't look good. But then, Phelps came charging, and the boy followed his idol. Le Clos had watched Phelpsian comebacks such as this for more than a decade, but now he was in the middle of it. He thought of the lessons he had learned from all the races he watched.

Keep his arms long. Push his chest out as far as he could.

Phelps had done the same and sped out to the lead. With about 20 meters left, le Clos looked to his left and realized he, too, had a shot.

"It was just like the 200," le Clos said. "I was thinking, 'I'm catching him. I'm catching him.'"

But that changed in the last 5 meters.

"I took one last look, one quick look," he said. "I thought maybe if he finished badly again I might get it, but no way. He got it tonight."

The final times: Phelps, 51.21 seconds; le Clos, 51.44. Less than one-quarter of a second between them. In a way, that's how it was supposed to end, with Phelps offering one last in-person lesson to a protégée.

"Michael got to pay him back for the other night, which was nice," Bowman said. "This is a tough game. You've gotta learn. The kids have to learn, right?"

For le Clos, the night had only begun. He promised himself that no matter what happened, whether he finished in first or eighth, he would walk over to Phelps and tell him something when he climbed out of the pool and his Olympics were over.

"I told myself I would tell him he was my hero," le Clos said. "So that's what I did."

Phelps responded by softly tapping le Clos on the shoulder and briefly putting his arm around him.

"I think he knew already," le Clos said. "He told me he would wish me luck for the future and said he really wanted to watch me do great things."

The moment touched le Clos' father, Bert, who looked on from the front row of the second deck of the Aquatics Centre.

"It's like Larry Holmes and Muhammad Ali," he said. "I mean, this is my son's hero. When [Phelps] put his arm around Chad, it's unbelievable. Michael is the most gentlemanly person in sport. From the le Clos family to the Phelps family, I want them to know how much we appreciate everything Michael did for us. He changed my family's life."

Before the night ended, le Clos and Phelps spent even more time together, arguing over who would win in a "FIFA" video game battle and discussing getting together someday to go cage diving in South Africa.

"He said he plays on PlayStation. I play on Xbox," Phelps said. "He says he could still take me. It's that competitiveness we both have. It's cool to see. It's been great getting to know him."

What a week it had been. Three years ago, when he made his first South African senior team for the world championships in Rome, all le Clos cared about was being in the same pool with Phelps. But the two were in different preliminary heats then, and le Clos missed a spot in the semis by .10 seconds.

Now he is a footnote to history: the last man to ever beat Michael Phelps.

"I never thought this would happen," he said. "From watching him in Athens to sitting here ... it's absolutely fantastic."

But perhaps no one was moved more than Phelps. On the second-to-last night of his illustrious career, he was the one who got to witness firsthand the results of a dream he had 13 years ago.

"It just goes to show that anything you want and anything you want to achieve, if you put your mind to it, you're going to achieve it," Phelps said. "I've said that so many times, and it's true. Chad is showing that. He has a lot more goals he wants to achieve, and I'm excited to see him continue in the sport and see what he does."