Joseph Schooling pulled off a major upset at the Rio Games on Friday to beat US phenomenon Michael Phelps in the men’s 100m butterfly and claim Singapore’s first ever Olympic gold medal.The 21-year-old foiled Phelps’ quest for a 23rd career gold medal and fifth in Brazil. Phelps, South Africa’s Chad le Clos and Laszlo Cseh of Hungary all dead-heated for silver.

Joseph Schooling pulled off a stunning upset at the Rio Olympics on Friday by beating Michael Phelps in the 100m butterfly to win Singapore’s first ever gold medal.

Asian champion Schooling, 21, completed a wire-to-wire victory to deny Phelps a fourth successive title in the event, winning in a Games record 50.39sec as Phelps, amazingly, tied with both Chad le Clos and Laszlo Cseh for the silver.

“I don’t know if I’ve been in a tie so a three-way touch is pretty wild,” said Phelps, whose Olympic gold medal tally remains at a staggering 22.

“I saw a second next to my name then I looked up again and I looked at Laszlo and Chad and I went we all tied for second, that’s kind of cool.”

The American, who had won four finals in Rio to stretch his record tally to 22, clocked 51.14, along with fierce rivals le Clos and Cseh.

“It’s faster than I went four years ago to win, but Joe’s tough,” Phelps said.

“Obviously he’s had a great year last year and had a really great last two years, so hats off to him.”

The American, who had won four finals in Rio to take his record tally to a staggering 22 golds, clocked 51.14, along with fierce rivals le Clos and Cseh.

Victory in Friday’s fly would have given Phelps a 14th individual Olympic title, but Schooling proved too strong.

Schooling, who took bronze at last year’s world championships, punched the water and roared with delight as Phelps swam over to pat him on the back before le Clos ruffled the youngster’s hair.

Phelps, competing in his fifth and final Games, will be odds-on to win a fifth gold medal in Sunday’s 4x100m medley relay — an event the Americans have never lost at the Olympics — to finish with a total of 23 golds.

Phelps was sixth at the turn and Schooling — almost exactly a decade younger than the 31-year-old American — wouldn’t let him pull off one of his patented comebacks on the return lap. The winning time was 50.39 seconds, which was also an Olympic Record.