Roger Federer had won seven consecutive tournaments and was closing in on Guillermo Vilas' 30-year-old record of 46 straight victories.
However, Guillermo Canas beat the world's top-ranked player 7-5, 6-2 Sunday in the second round of the Pacific Life Open, snapping Federer's 41-match winning streak.
"Today was just a grind for me from the start," said Federer, the three-time defending tournament champion. "A first-round match is always difficult. But I've had an incredible run, not losing in the first round for, I think, over two years. Sooner or later it had to happen, so it's OK, it's no problem."
Despite the loss, the Swiss star began Monday as the No. 1 player on the ATP Tour for a record 163rd consecutive week.
Federer, who received a bye into the second round, was playing his first match at Indian Wells, while Canas was in his fourth. The Argentine played two matches in qualifying, where he lost to Alexander Waske in the final round, then got into the 96-player field as a "lucky loser" when Xavier Malisse withdrew.
Canas then cruised past Jan Hajek of the Czech Republic in the first round on Saturday.
"I think if I would have played him in the third or fourth round I would have beaten him," Federer said. "But just not today. He was too tough."
Canas is the first lucky loser to beat a world No. 1 since Sandon Stolel beat Thomas Muster in Dubai in 1996
"I don't know. Just I beat him," Canas said. "I enjoyed it. I don't know how I do it. But I think I played good."
He handed Federer his 16th loss since he became No. 1 on Feb. 2, 2004, and his first opening match loss since 2004 at Cincinnati, where he lost to Dominic Hrbaty.
Federer hadn't lost since falling to Andy Murray on Aug. 16, 2006, in Cincinnati.
"It's no pressure at all because I take it match by match," Federer said of the streak. "You guys (reporters) think it takes a win to break the record. I'm concerned about winning my first match against a lucky loser. It just shows you how tough it is."
Canas, who rejoined the ATP Tour at the end of January after a 15-month doping suspension, went up 6-5 in the first set with a service break and held to close out the set.
Then, between sets, Federer called for the ATP Tour trainer for assistance with a blister on his right toe and an annoying problem with the tape on his feet and ankles coming loose. He called for the trainer again after holding serve to pull to 3-2 in the second set, then lost the final three games. Afterward, he said the lengthy delay disrupted his rhythm.
"I didn't really get into that second set at all," Federer said. "I've come back so many times, and every time it seems when I come back, it's normal (expected). When I don't come back it's like there's a problem.
"That's not the way it is. A guy put me away when he had to. He played a perfect match in the end. He didn't give me any more chances. He served well. He didn't give me any unforced errors and I was just playing too poorly in the end to come back. So the right guy won today. That's just a fact."
Despite the loss, Federer returned to the court later to play doubles with Yves Allegro, and the Swiss duo beat Spain's David Ferrer and Tommy Robredo 6-4, 7-6 (2) in a first-round match.
Sixth-seeded James Blake, No. 4 Nikolay Davydenko, No. 8 Ivan Ljubicic, No. 9 Tommy Haas, No. 12 Novak Djokovic, No. 13 Murray, and No. 14 David Ferrer.
However, 19th-seeded Lleyton Hewitt was beaten, 7-6 (3), 4-6, 6-2 by Janko Tipsarevic, a Serb ranked No. 100 in the world. Also falling were: Tommy Robredo (No. 7), Tomas Berdych (11), Marcos Baghdatis (17), Dmitry Tursunov (20), Mardy Fish (21), Marat Safin (23), and Dominik Hrbaty (24).
In a women's third-round match, top-ranked and defending champion Maria Sharapova of Russia stayed on course to repeat with a 7-5, 6-2 win over Nathalie Dechy of France. Sharapova's next opponent will be No. 15 seed Vera Zvonareva, who advanced with a 6-3, 6-3 win over Victoria Azarenko, the AP reports.
Other seeded women advancing were: Martina Hingis (3), Jelena Jankovic (7), Anna Chakvetadze (8), Shahar Peer (11), Na Li (12), former event winner Daniela Hantuchova (14) and Vera Zvonerva (15).