ROGER Federer survived a stern test from Spain's Roberto Bautista Agut on Tuesday to reach the Miami Open quarter-finals while top-seeded Swiss compatriot Stan Wawrinka was eliminated on his birthday.

Federer clinched the 7-6(5) 7-6(4) victory on his third match point shortly after Wawrinka fell 4-6 6-2 6-1 to 16th-seeded German teenager Alexander Zverev.

Bautista Agut played the match of his life, hitting the ball deep with relentless precision in an effort to keep Federer pinned to the baseline, giving the 18-times grand slam champion everything he could handle.

But Federer's class proved the difference in the tiebreaks as he improved to 6-0 lifetime against Agut and advanced to a quarter-final match against Czech 10th seed Tomas Berdych.

Wawrinka, who turned 32 on Tuesday, lost to Federer in the Indian Wells final nine days ago and was denied a chance of setting up a possible rematch in Miami.

A day after saving three match points and beating John Isner, the 19-year-old Zverev dominated the final two sets against Wawrinka, breaking twice in the second and three times in the third to earn a quarter-final encounter with either Belgian David Goffin or Australian Nick Kyrgios.

All the top seeds had competitive matches on Tuesday, with Japanese second seed Kei Nishikori also taken to three sets before ousting Federico Delbonis of Argentina 6-3 4-6 6-3.

Fifth seed Rafa Nadal won in straight sets, but also had to be near his best to beat Frenchman Nicolas Mahut 6-4 7-6(4).

Next up for Nadal is American Jack Sock, while Nishikori meets Italian Fabio Fognini.