World number one Ashleigh Barty was stunned by Sara Sorribes Tormo of Spain in the first round of women's Olympics singles in Tokyo.
Australian Barty, who won her second Grand Slam title at Wimbledon in July, cut a frustrated figure in her 6-4 6-3 loss to 48th-ranked Sorribes Tormo.
The victory is the biggest of Sorribes Tormo's career.
Japan's second seed Naomi Osaka cruised past Saisai Zheng of China 6-1 6-4.
Osaka, who lit the Olympic flame in the opening ceremony, is the highest-ranked player remaining in the draw.
Barty will still compete in Tokyo after she and Storm Sanders reached the second round of the women's doubles on the first day.
She put in an error-strewn performance against Sorribes Tormo, making 55 unforced errors to the Spaniard's 13.
"It's something I've been dreaming all my life, being here and, even more, beating a number one," Sorribes Tormo said.
"It's an amazing feeling. I still can't believe it."
Beaten Wimbledon finalist Karolina Pliskova advanced with a 6-1 6-3 win over Alize Cornet of France, while Belarusian third seed Aryna Sabalenka beat Poland's Magda Linette 6-2 6-1.
Spain's Carla Suarez Navarro claimed her first singles victory since her recovery from cancer as she beat Tunisia's Ons Jabeur 6-4 6-1.
Temperatures reached 32 degrees in Tokyo on Sunday, leading the International Tennis Federation (ITF) to activate their extreme weather policy.
Players were given a 10-minute break between the second and third set once the reading went above 30.1C, with change of ends and set breaks also extended by an extra 30 seconds.
World number one Novak Djokovic and Daniil Medvedev both complained about the heat during their first-round matches.
"A lot of the competition schedule has been built when possible to avoid the hottest part of the day," Kit McConnell, sports director of the International Olympic Committee, said.
"But that's not possible with every sport and on top of that there is extensive heat measures across all of the training and all of the competition and that has been in place for a number of years."