(CNN) -- Longtime rivals Roger Federer and Rafael Nadal remain on course for a semifinal showdown at the Indian Wells Masters after both former world No. 1s moved into the last eight of the U.S. hard-court tournament.
Third seed Federer, a three-time winner here, battled from a set down to beat 50th-ranked Brazilian Thomaz Belluci 3-6 6-3 6-4, while 2011 runner-up Nadal eased past 21st seed Alexandr Dolgopolov 6-3 6-2.
World No. 1 Novak Djokovic was earlier taken to three sets by unseeded Spaniard Pablo Andujar, but closed out a 6-0 6-7 6-2 victory.
Switzerland's Federer, a 16-time grand slam winner, will face Argentine ninth seed Juan Martin del Potro -- the man who beat him in the final of the 2009 U.S. Open -- for a place in the last four.
"I really struggled to make the transition (from Wednesday's match)," 30-year-old Federer told the tournament's official website. "I was quite surprised, but at the end I found a way, dug deep and came through.
"It's really important. At the end of the day, these are the wins that sort of almost feel better, to be quite honest, because when you're playing great, it's simple, and it's easy."
Spaniard Nadal, who won the California event in 2007 and 2009, will face former world No. 3 David Nalbandian after the Argentine earned a shock win over French sixth seed Jo-Wilfried Tsonga.
Djokovic, who beat Nadal in the 2011 Indian Wells final, will play another Spaniard in the next round, following 12th seed Nicolas Almagro's 6-4 6-0 win against Czech No. 7 Tomas Berdych.
"In the end I was lucky to get through some points," Serbia's five-time grand slam winner said. "I am happy to go through to the next round."
John Isner is the last remaining U.S. hope in the draw. The 11th seed beat Australian qualifier Matthew Ebden 6-4 7-5 to set up a clash with French No. 13 Gilles Simon -- who defeated American 19-year-old Ryan Harrison 7-6 (7-0) 5-7 6-1.
In the women's draw, world No. 1 Victoria Azarenka reached the semifinals as she continued her impressive recent form. The Australian Open champion secured a comfortable 6-0 6-2 win over Polish fifth seed Agnieszka Radwanska.
"I had very good motivation because I knew she's a very good player," the 22-year-old from Belarus told the WTA's official website.
"I have to play a very good match and show excellent tennis to beat her. I was focused on every moment, every point and every ball I was striking. I really didn't think about the score, because there's really no point getting into that."
Azarenka will play Germany's Angelique Kerber for a place in the final, after the 18th seed earned a surprise 6-4 6-2 victory over French Open champion and eighth seed Li Na of China.