Rafael Nadal reached the BNP Paribas Open quarter-finals in Indian Wells after winning the last five games to beat Alexander Zverev 6-7 6-0 7-5.
Nadal faced a match point but the German missed an easy volley – later admitting: “On match point I sucked.”
Three-time champion Nadal plays Japan’s Kei Nishikori next and could face Novak Djokovic in the semi-finals.
Serena Williams beat defending champion Simona Halep 6-4 6-3 to reach the last four in the women’s draw.
The world number one now plays Poland’s Agnieszka Radwanska, who beat Petra Kvitova 6-2 7-6 and will reclaim the world number two ranking when the new list is released on Monday.
Earlier, Djokovic beat Spain’s Feliciano Lopez 6-3 6-3 to set up a quarter-final with Jo-Wilfried Tsonga of France.
In the doubles, Jamie Murray will rise to the top of the world rankings if he wins his quarter-final later on Thursday. Murray and partner Bruno Soares face Feliciano Lopez and Marc Lopez from 22:00 GMT.