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."
What else happened in Rome?
Wimbledon champion Elena Rybakina, seeded seventh, moved into the women's singles quarter-finals with a 6-3 6-3 win against Czech Marketa Vondrousova, who was the French Open runner-up in 2019.
Kazakhstan's Rybakina, 23, has reached her first clay-court quarter-final since Roland Garros in 2021 and could play Poland's world number one Iga Swiatek in the last eight.
Swiatek, 21, faces Croatian 21st seed Donna Vekic in the last 16 later on Monday.
In the men's draw, Russia's Daniil Medvedev recovered from a slow start to win 3-6 6-1 6-3 against Spain's Bernabe Zapata Miralles.
Former world number one Medvedev, seeded third, had never won a match in Rome before this year but is now into the last 16.
"I'm definitely playing my best tennis on clay right now, I'm feeling great," said Medvedev, who has struggled on the surface in the past.
Russian sixth seed Andrey Rublev won the Monte Carlo title last month and continued his fine form on clay by beating Spanish 27th seed Alejandro Davidovich Fokina 7-6 (10-8) 6-3.