It may have looked dire for a little while but Rafael Nadal has still never lost two matches in a row on clay in his career.

After losing his 44th career clay-court match last week—in Monte Carlo to eventual champion Fabio Fognini—Nadal found himself down a set to Leonardo Mayer on Wednesday in Barcelona. The lost set also meant Nadal's consecutive set count in Barcelona ends at 30. 

He pulled out out the win, 6-7 (7), 6-4, 6-2. The 44 clay losses span his entire career including ATP-level, ATP Challenger and ITF. 

He has a perfect 6-0 record against the Argentine, having now lost just two sets to the world No. 63: the first one was in their four-set 2017 US Open encounter.

"Not the best feelings I had this afternoon, I found a way to keep going, that's the main thing..." Nadal told Amazon. "I was not competing that well."

The top seed will take on compatriot David Ferrer next, who will play his final event in Madrid next week. 

The King of Clay still has some time to find his grove before the French Open, but he's the defending champion in both Barcelona and Rome. He's an 11-time winner in Barcelona and the stadium court is named after him.

Follow Nina on Twitter @ninapantic1