World number one Roger Federer made his best start to a season and reached the BNP Paribas Open final with a hard-fought win over Croatia’s Borna Coric.
The Swiss beat 49th-ranked Coric 5-7 6-4 6-4 at Indian Wells.
The win was Federer’s 17th of the year, surpassing his previous career best of 16 consecutive victories in 2006.
He will face Argentina’s Juan Martin del Potro in the final after the sixth seed’s emphatic 6-2 6-3 win over Canada’s Milos Raonic.
Defending champion Federer is searching for a record sixth title at Indian Wells but he will have to overcome the man who beat him at the US Open last year.
He has won 39 of 43 sets this year and claimed titles at the Australian Open and the ATP event at Rotterdam.
Federer started slowly against Coric and sent a drop shot into the net to allow Coric to serve for the opening set.
The Croat dropped just seven points on his serve as he became the first person in nine matches at Indian Wells to take a set off Federer.
Coric broke Federer’s serve in the opening game of the second set but Federer forced his way back in, before a long forehand from Coric handed him the set.
Once again, Coric broke early in the third set but Federer cancelled the break in the next game.
Coric came close to a stunning win when he broke in the seventh game of the match, but a slip on his serve allowed Federer to win the final 11 points and claim victory.
BBC tennis correspondent Russell Fuller at Indian Wells
This was a bold and thrilling attempt by Coric to stop Federer in his tracks.
He earned himself a 7-5 4-2 lead with aggressive instincts before Federer won four games in a row.
On an increasingly blustery day, Coric was twice a break up in the decider, but Federer’s finish was memorable.
The champion turned things his way by going for a little less. The backhand slice and more striking down the middle had the desired effect, but all credit to Coric for making a Federer defeat a genuine possibility for the first time this fortnight.
In the final, the world number one will put his 17-match unbeaten streak on the line against Del Potro’s 10-match unbeaten run in what he predicts will be an “arm-wrestle”.