Incoming world number one Carlos Alcaraz suffered his earliest exit in a tournament since October when he was beaten by Hungarian qualifier Fabian Marozsan in the Italian Open last 32.
Spain's Alcaraz, who will replace Novak Djokovic at the top of the rankings after the event, lost 6-3 7-6 (7-4).
It was only the 20-year-old's second defeat in 22 matches on clay in 2023.
Marozsan, ranked 135th, had never played in the main draw of an ATP Tour event until this week in Rome.
But the 23-year-old looked full of confidence and unfazed by his opponent, hitting 24 winners and making just 13 unforced errors.
He will play Croatia's Borna Coric in the fourth round after completing one of the biggest ATP upsets in recent years.
Second seed Alcaraz had won his past 12 matches on clay, having won back-to-titles titles in Barcelona and Madrid, and is considered one the favourites to win the French Open, which starts on 28 May.
"He surprised me a lot, his level was really high and I'm sure he will break the top 100 very soon," said Alcaraz.
"I didn't play very well but he played at a high level and I couldn't follow it."
Marozsan caused problems for Alcaraz, who made a high number of uncharacteristic errors, with his powerful forehand and cute drop-shots.
Alcaraz saved a break point at 5-5 in the second set which would have left Marozsan serving for the match, and led 4-1 in the resulting tie-break.
It looked as though the US Open champion might force a decider despite being second best throughout, but Marozsan stayed cool and fought back by winning the next six points.
"It is not easy to say something. I am very happy. It was my dream last night," Marozsan told Amazon Prime.
"I tried to do something special, win a few games or a set and I've just beaten the world number one.
"I can't believe it. Everything was perfect today."