Novak Djokovic's 19-match winning streak at Indian Wells ended in a 6-4, 7-6 (3) loss to Nick Kyrgios. Djokovic joined Nadal and top-ranked Andy Murray, who was upset in the second round.
Djokovic, Federer and Nadal were all in the same quarter of the draw, ensuring the tournament would lose some of its biggest names before the second weekend.
Kyrgios beat Djokovic for the second time in two weeks, having earned a straight-set victory over the world's No. 2 player at Acapulco on March 2.
"Conditions like today where the ball travels through the air very fast and it bounces very high, it's a gamble," Djokovic said. "On his first serves, to try to anticipate and read his serve, where he's going to go 140 miles per hour down the T and also pretty good angle wide, it's hard to position yourself well."
Djokovic was bidding for a fourth consecutive title at Indian Wells, having won a total of five in his career. But he unraveled with 25 unforced errors, including a forehand service return on Kyrgios' second match point.
"The run was amazing," Djokovic said. "It had to end at some stage. Unfortunately, it was today."
Kyrgios advanced to the quarterfinals, where he will face Federer. The 15th-seeded Australian hit 14 aces, with his fastest serve clocking 141 mph, and won 86 per cent of his first serve points.
Also joining Kyrgios in the quarterfinals were No. 4 seed Kei Nishikori, who defeated Donald Young 6-2, 6-4; 17th-seeded Jack Sock, a 4-6, 7-6 (1), 7-5 winner over Malek Jaziri; No. 21 Pablo Carreno Busta, who beat qualifier Dusan Lajovic; and No. 27 Pablo Cuevas, who outlasted 11th-seeded David Goffin 6-3, 3-6, 6-3.
On the women's side, No. 8 seed Svetlana Kuznetsova beat 19th-seeded Anastasia Pavlyuchenkova 6-3, 6-2 to reach the semifinals.