World No 1 Andy Murray was knocked out of the Monte Carlo Masters on Thursday as Spaniard Albert Ramos battled back from 4-0 down in the final set to win 2-6, 6-2, 7-5 and reach the quarter-finals on a day of upsets.
Swiss third seed Stan Wawrinka, the 2015 French Open champion, was also sent packing when he lost to Uruguay's Pablo Cuevas 6-4, 6-4.
Murray was playing only his second match since returning from a five-week layoff after an elbow injury having been handed a first-round bye in the first big European claycourt tournament of the season.
"I'm disappointed to lose from the position that I was in. Being 4-0 up in the third, I haven't lost many matches like that in my career," Murray told a news conference.
"He obviously started playing better towards the end of the set. I still had a bunch of chances. I guess both of us did, really. I should have been able to do enough to weather that storm a little bit and finish the match off."
The Scot played impressively to win the opener in 48 minutes at the Monte Carlo Country Club as Ramos, ranked 24th, failed to hold a single service game.
Murray dropped serve at the start of the second though and his 15th seeded Spanish opponent raised his game to level the match in the Monaco sunshine.
Murray conceded only three points as he romped into a 4-0 lead in the decider but claycourt specialist Ramos reeled off four games in a row and then broke again at 5-5 before sealing victory on his serve when Murray netted a dropshot.
It was Ramos's first victory over a top-ranked opponent and he will now play fifth-seeded Croatian Marin Cilic, who beat Tomas Berdych 6-2, 7-6.
Nine-time champion Rafael Nadal crushed birthday boy Alexander Zverev for the loss of only two games.
French Open champion Novak Djokovic was made to work hard by Spain's Pablo Carreno Busta, but the Serbian came out on top with a 6-2, 4-6, 6-4 victory.
Nadal dropped a set in the second round against Kyle Edmund but was ruthless as he dispatched another young gun, the 20-year-old Zverev who was reduced to trashing rackets in frustration against the Spaniard.
The nine-time French Open champion needed little more than an hour to win 6-1, 6-1.
Things were harder for Djokovic, who was a break up in the third set against Carreno Busta, but allowed his rival back into the contest as the Spaniard rallied from 4-2 down to level, only for the Serbian to win the last two games.