Murray was broken seven times during a see-saw encounter with the Spaniard and was leading 4-0 in the final set before he suffered a spectacular collapse.

Ramos-Vinolas rallied back to take the next four games to level the decider and despite the Scot taking the ninth to go 5-4 up, the 15th seed closed out the match with three successive games to seal an unlikely victory.

"I'm disappointed to lose from the position that I was in," said Murray, last year's French Open runner-up. "Being four-love up in the third, I haven't lost many matches like that in my career."