Japan's world number 14 Kei Nishikori dumped defending champion Roger Federer out of the Madrid Masters at the third round stage on Thursday as he beat the 17-time Grand Slam champion 6-4, 1-6, 6-3.
Federer, who returned to the tour in the Spanish capital after a two-month layoff, was broken in the fifth game of the first set as Nishikori went onto seal it comfortably 6-4.
The Swiss seemed to have found his rhythm in the second as a double break saw him take the set 6-1, but Nishikori dominated the third set as he broke to go 2-1 in front and then again in the final game to move into the quarter-finals.
Nishikori will face Spain's Pablo Andujar for a place in the semi-finals.
Rafael Nadal safely booked his passage into the quarters as he saw off Mikhail Youzhny 6-2, 6-3 in just under an hour and 15 minutes.
The Japanese hadn't been beyond the last-16 of any tournament since winning in Memphis back in February, but he showed no sign of nerves throughout against the three-time champion in Madrid.
"I'm disappointed with my match. Today Nishikori played better and the best man won," said Federer.
Nishikori made the breakthrough in the first set with Federer serving at 2-2 to move ahead and was comfortable on serve himself for the remainder of the set as he closed it out without even facing a break point.
Federer was more like his usual self in the second as he upped his consistency and depth to race through it 6-1.
However, the tide turned again at the beginning of the third as Nishikori forced two break points at 1-1 and was gifted the break when Federer dragged wide with a regulation midcourt forehand.
The 23-year-old was then untroubled on his own serve as he held to 15 and love in his next two service games.
And Nishikori secured his first ever win over Federer when he broke again when Swiss fired long in the next game.
World No.1 Serena Williams cruised into the Madrid Open quarter-finals as she dismantled 13th seed Maria Kirilenko 6-3, 6-1 in just an hour and four minutes on Thursday.
Williams didn't even face a break point during the match as she steamrollered the Russian, dropping only one more game from 3-3 in the first set.
The second set was straight forward for the 15-time Grand Slam champion as she raced into a 5-0 lead and then served out in style to book her place in the quarters, where she will face Spaniard Anabel Medina Garrigues.
World No.2 Maria Sharapova, who has yet to drop a set, continued her stroll into the quarter-finals as she overcame Sabine Lisicki 6-2, 7-5.
The Russian, who could overtake Williams at the top of the rankings should she win the title this week, broke the German's serve four times to prevail in a disjointed opening set.
Serve was more dominant in the second set with both players exchanging just the one break early on before Sharapova secured a crucial second break at 5-5 and served it out to take her place in the last eight.