Andy Murray wins but Roger Federer is out of Madrid Open

Andy Murray beat Gilles Simon to move into the fourth round of the Madrid Open but defending champion Roger Federer suffered a shock defeat.

Murray was taken to three sets by his French opponent, winning 2-6 6-4 7-6 (8-6) but 17-time Grand Slam champion Federer was beaten 6-4 1-6 6-2 by 14th seed Kei Nishikori of Japan.

"It's the biggest win for me, especially on clay," said Nishikori.

Rafael Nadal won his third-round match, beating Mikhail Youzhny 6-2 6-3.

Andy Murray analysis

"As he admitted, when we spoke in his locker room at 1.30am, as he warmed down on the exercise bike, this was not very pretty. Just one of those matches - as his coach Ivan Lendl keeps reiterating - where you need to win the final point. Against a familiar opponent playing more aggressively than usual, Murray was terrible for an hour, seemingly lacking energy, as he went a set and break down. But suddenly he sprang to life in the fourth game of the second and, after claiming that set, raced a break up in the third. Unexpectedly, Simon pegged him back before a series of tight games towards the end and a crazy deciding tie-break which Murray edged 8-6 on his sixth match point. He said he expected to sleep not before 4am. "Not ideal", he said, ahead of a quarter-final with Tomas Berdych later today."

Spaniard Nadal, 26, is seeking to win the tournament for a third time and the fifth seed has now seen two of his main rivals fall in the space of 48 hours.

Murray's footwork was poor and he looked sluggish in losing the opening set before taking control in the second with a series of stunning forehands.

The Scot stepped up the power in his game in the final set only to find a determined Simon refusing to capitulate.

Simon defended three match points to force a final set tie-break and then saved another three match points but he netted a volley to hand Murray victory.

Murray will now face Czech world number six Tomas Berdych in the quarter-finals at around 19:00 BST on Friday.

Second seed Federer's defeat follows Tuesday's shock exit for world number one Novak Djokovic at the hands of Bulgarian Grigor Dimitrov.

Federer's conqueror Nishikori now plays Spanish wildcard Pablo Andujar in the quarter-finals.

The Swiss, who was returning from a two-month lay-off, was magnanimous in defeat saying: "I'm disappointed with my match. Today Nishikori played better and the best man won."

The three-time Madrid champion was broken in the fifth game of the opening set and Nishikori showed no signs of nerves as he served out the set without facing a break point.

Federer upped his consistency and the depth of his shots to race through the second set but he dragged a regulation midcourt forehand wide to gift his opponent a break and 2-1 lead in the decider.

Nichikori then twice held his serve to 15 and picked up his first win over Federer when the Swiss fired long.

You can listen to live commentary of Andy Muray's quarter-final match against Tomas Berdych on BBC Radio 5 live sports extra from 19:00 BST.