Rafael Nadal avoided successive shock losses on clay as he began his Barcelona Open title defence with a 6-7 (7-9) 6-4 6-2 win over Leonardo Mayer.
The top seed, 32, lost to Fabio Fognini on Saturday in the Monte Carlo Masters semi-finals, and on Wednesday struggled at times against Argentine Mayer.
The 11-time French Open champion will now play fellow Spaniard David Ferrer in the last 16.
Ferrer, 37, recorded a 6-3 6-1 win over 15th seed Lucas Pouille.
Also through is Argentine Guido Pella who beat sixth seedKaren Khachanov 6-2 7-6 (7-4).
Another seed to fall in the last 32 was French 11th seed Gilles Simon, beaten 6-3 6-3 by USA’s Mackenzie McDonald.
There was no such hiccup for Russian seventh seed Daniil Medvedev who defeated Albert Ramos Vinolas 6-3 2-6 6-1.