Rafa Nadal toppled big-serving American Reilly Opelka 7-6(3) 7-6(5) to remain perfect on the year while unseeded Serbian Miomir Kecmanovic stunned world number six Matteo Berrettini 6-3 6-7(5) 6-4 in the fourth round of Indian Wells on Wednesday.

Despite Opelka's serve reaching speeds as high as 147 miles per hour, the Spaniard was the better in their rallies, dictating points and eliciting errors from the baseline.

After a high-level first set, Nadal wobbled in the second, playing a sloppy service game to go down a break at 3-2 and he tapped his head in frustration during the changeover.

But he regained his focus, breaking back to level at 4-4 and remaining perfect on serve in the second tiebreaker. He sealed the victory with a beautifully constructed point that pushed Opelka off the court.

"He is a very difficult player to play against with his huge serve and huge forehand, but I think I played my best match of the tournament so far," Nadal said in an on-court interview.

Nadal stood as far back off the baseline as the court would allow on his returns and often had to hit them at head height or higher.

"It's not only about the speed. The spin is also difficult to read. Sometimes it's coming with topspin, sometimes with slice.

"It's a great victory for me against one of the toughest opponents I can play and I'm very happy. I can't thank you enough for all the positive energy that I receive every single day here."

Nadal is now 18-0 to start the season and if he can win his fourth title in the California desert, he will move into a tie with Novak Djokovic for the most Masters 1000 titles with 37.

To do so, the 21-time Grand Slam champion will need to defeat another huge server in Australian Nick Kyrgios, who advanced by walkover after Italian Jannik Sinner withdrew from the tournament due to illness.

Nadal holds a 5-3 lead over Kyrgios in their previous meetings.

Earlier in the day Kecmanovic absorbed Berrettini's power serve in the first set, converting on a break point chance in the fourth game, as a frustrated Berrettini won just eight return points.

But Kecmanovic, 22, was unable to close out the match as a break point opportunity slipped through his fingers late in the second set, in which Berrettini, who reached his first Grand Slam final at Wimbledon last year, struck 21 winners and won a tense tiebreak to level.

Berrettini saved two breaks in the eighth game in a tightly fought final set to stay alive but Kecmanovic pounced to break the Italian's serve to love in the final game.

He will next play Taylor Fritz who outlasted Australian Alex de Minaur 3-6 6-4 7-6(5). A break down in the third, it was the second consecutive match Fritz won in a third-set tiebreaker.

Elsewhere, Bulgarian Grigor Dimitrov beat American John Isner 6-3 7-6(6) and will face Andrey Rublev in the quarters after the Russian won a tight opening set before easing past Hubert Hurkacz 7-6(5) 6-4.

Carlos Alcaraz became the youngest Indian Wells men's quarter-finalist since 17-year-old Michael Chang in 1989, as the 18-year-old Spaniard beat Gael Monfils 7-5 6-1.

Up next for Alcaraz in his first Masters quarter-final is 12th seed Cameron Norrie or Jenson Brooksby.