Joseph Schooling brought Michael Phelps to school inside the pool.

Phelps was finally bested at the 2016 Rio Olympic Summer Games in Brazil as Schooling of Singapore defeated Phelps in the 100-meter butterfly as the American took home the silver medal with a time of 51:14.

Schooling clocked a 50:39 to take home the win at the Olympic Games and was thrilled afterward.

In an ironic turn of events, Phelps was the very reason Schooling strived to be better in the pool.

"A lot of this is because of Michael," Schooling said, according to The Baltimore Sun. "He's the reason I wanted to be a better swimmer."

Phelps wasn't a sore loser about it, giving Schooling his just deserts after the stunning turn of events.

"What Joe is able to achieve is up to him," Phelps said. "I'm excited to see how much faster than he can go."

Phelps won't be leaving Rio de Janeiro empty handed as he now has a record 22 gold medals and 27 overall.

For more content, follow us on Twitter @SportsWN or LIKE US on Facebook.