Argentina's Juan Martin del Potro ended Novak Djokovic's 22-match winning steak, beating the Serbian star 4-6, 6-4, 6-4 on Saturday to reach the ATP Indian Wells Masters final.
World No. 1 Djokovic had not lost a match since falling to American Sam Querrey at the Paris Masters on October 31.
His 17 wins this year included a run to a fourth Australian Open title and an ATP triumph in Dubai.
"It's OK. It happens in sport," Djokovic said of the end of his winning streak. "I just didn't make it this time."
After del Potro leveled the match by winning a tense second set that included five breaks of serve, Djokovic appeared to have regrouped.
He sped to a 3-0 lead in the third with one break of serve, but del Potro broke back to narrow the gap to 3-2.
While del Potro was unable to convert two break chances in the seventh game, he came through in the ninth.
A well-judged forehand to the corner gave him a second break point in the game, and when Djokovic sailed a backhand long, del Potro was serving for the match.
He polished it off in style, with a 133 mile per hour ace.
"I didn't deserve to win today," a weary-sounding Djokovic said. "Whenever I had chances, second, third set, I throw them away with some unforced errors. My movement was poor, and I congratulate to my opponent."
In the final, seventh-seeded del Potro will face 11-time Grand Slam champion Rafael Nadal of Spain.
Nadal, seeded fifth, reached his fourth final in as many tournaments since returning from a seven-month injury absence with a 6-4, 7-5 victory over sixth-seeded Czech Tomas Berdych.