Defending champion Roger Federer has been knocked out of the Shanghai Masters at the second-round stage by Spanish qualifier Albert Ramos-Vinolas.
The second seed was beaten 7-6 2-6 6-3 by the Spaniard to fall at the first hurdle after he received a bye in round one.
In the first set Federer had a couple of break-point chances in Ramos-Vinolas's first service game, but he was unable to take them and both men were supreme on serve to send it to a tie-break.
There was only one mini-break and it went Ramos's way as he closed out the opener 7-4.
Federer responded in the second set with a pair of breaks to take it 6-2, but he failed to win the decider as Ramos-Vinolas caused a huge upset.
The world number 70 broke in the eighth game to move 5-3 in front and then won his first match point to book his place in the last 16, where he will face 16th seed Jo-Wilfried Tsonga.
It is Ramos-Vinolas's first-ever win at the 16th attempt against a top-10 player.