Phelps was seeking his 23rd Olympic gold in the 100m butterfly but Schooling, 21, relegated the legendary American to silver.
Rio de Janeiro: Singaporean outsider Joseph Schooling stunned the great Michael Phelps and Almaz Ayana obliterated the long-standing women`s 10,000m record on a day of surprises at the Rio Olympics on Friday.
Phelps was seeking his 23rd Olympic gold in the 100m butterfly but Schooling, 21, relegated the legendary American to silver -- which he shared with both Chad le Clos and Laszlo Cseh.
"I`m just ecstatic. I don`t think it has set in yet, it`s just crazy," said Schooling, who set a new Games record of 50.38sec.
"You know, breaking the Olympic record, and it was a thrill to swim against Michael Phelps and all all those guys."
It was among a number of shocks as 1,500m ace Sun Yang flopped out of his pet event and defending champions USA crashed out of the women`s football.
Ethiopia`s Ayana smashed the 23-year-old 10,000m record by nearly 14 seconds as the athletics competition got underway without Russia, whose track and field team are suspended over a doping scandal.
US swimmer Katie Ledecky also made history as she completed the first 200m, 400m and 800m treble since 1968 -- and again in world-record time.
America`s latest swimming star won the 800m by a distance in a time of 8min 04.79sec, beating her own world record of 8:06.68 set in January.
Elsewhere cyclist Bradley Wiggins became Britain`s most decorated Olympian of all time and Rafael Nadal, returning from a wrist injury, won men`s doubles gold.
The Rio Games also reeled from three doping cases as a Chinese swimmer was suspended and a Bulgarian weightlifter and Polish runner were kicked out.Victory in Friday`s fly, his last individual Olympic race, would have given Phelps, 31, 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.
"A three-way tie is pretty wild. It`s faster than I went, I think, four years ago to win," said Phelps.
"Joe (Schooling) is tough. He had a great year last year and has had a really great last two years so hats off to him. He swam a great race."
On the track, Ethiopia`s Ayana set tongues wagging when she smashed a record set in 1993 by timing 29min 17.45sec, 15 seconds ahead of Kenya`s Vivian Cheruiyot in second.
Ayana`s record was greeted with suspicion by marathon world record-holder Paula Radcliffe, but the 24-year-old brushed off the speculation.
"My doping is my training, my doping is Jesus -- otherwise I`m crystal clear," she smiled.
Athletics is battling a torrent of doping controversies after world body the IAAF suspended Russia`s track and field team and Kenya was threatened with the same treatment.
Michelle Carter of the United States stunned defending champion Valerie Adams with her very last throw to win the gold medal in the women`s shot put final.
Britain`s Jessica Ennis-Hill made a strong start to her heptathlon title defence as she won the 100m hurdles, finished third in the high jump and second in the shot put to lie second overall.French giant Teddy Riner, who stands 6ft 8in (2.04 metre) and weighs more than 300 pounds, won the men`s +100kg judo by penalties from Japan`s Hisayoshi Harasawa.
Earlier, Egyptian judoka Islam El Shehaby was jeered after refusing to shake hands with his Israeli opponent at the end of their heavyweight first round encounter.
Chen Xinyi, 18, a rising star in the Chinese swimming team, was suspended after she tested positive for a banned diuretic following Sunday`s women`s 100m butterfly, where she placed fourth.
The world sports tribunal had earlier expelled European champion weightlifter Tomasz Zielinksi and Bulgarian 3,000m steeplechase runner Silvia Danekova over doping as the Games registered its first major cases.
In football, American goalkeeper Hope Solo lashed out at Sweden as "cowards" as the 2004, 2008 and 2012 women`s gold medallists and reigning world champions went out 4-3 on penalties in the quarter-finals.
"We played a bunch of cowards," Solo told Sports Illustrated. "The better team did not win today."
Wiggins, along with Edward Clancy, Steven Burke and Owain Doull beat Australia in a world-record time to win the men`s team pursuit at the Rio velodrome. It was Wiggins` eighth medal, the most compiled by a Briton.
And Nadal paired with Marc Lopez to win the men`s doubles 6-2, 3-6, 6-4 against Romania`s Florin Mergea and Horia Tecau, sealing his second gold medal after winning the singles in 2008.