Roger Federer will be aiming for his sixth title at the Swiss Indoors in Basel on Sunday after battling past Vasek Pospisil 6-3 6-7 (3) 7-5 to set up a title rematch with Juan Martin del Potro.
Federer can clinch a place in London by winning what would be just his second title this season and qualifying into the year-end field for the 12th consecutive year.
He was made to work hard in his semi-final against 40th-ranked Vasek Pospisil of Canada, who was playing third semi-final of the season - and the third of his career.
Federer faltered when serving for the match at 5-3 in the second set, and fell 3-1 behind in the third.
Federer reclaimed the break immediately, but had to fend off another break chance for Pospisil before holding at 4-4.
At 5-5, Federer wasted three break chances before finally leading in the set when Pospisil fired a forehand long.
The world No 6 clinched victory with a powerful service winner and raised both arms in triumph after the two hour, 40 minute effort.
"It was so special with the public today," said Federer, who has reached the Basel final for the eighth consecutive edition and now stands 10-1 in semis.
"They really help me in situations like this. It makes all of the hard training worth it."
He will now meet top seed and defending champion del Potro on Sunday in a rematch of last year's final in Basel, which the home favourite lost.
Tough for Del Potro
Del Potro reached the final after overcoming Edouard Roger-Vasselin 6-4 4-6 6-2.
The tall Argentine came back strongly after a shaky spell when he let the second set slip away.
He eventually brushed aside the 65th-ranked Frenchman in the decider in two hours and six minutes.
Del Potro is fresh from a successful Asia tour, winning the Tokyo title and reaching the Shanghai Masters final against Novak Djokovic after beating Rafael Nadal.
He has already qualified for the World Tour Finals and the three-set victory extended his record to an impressive 47 wins and 13 losses in 2013, winning three titles.
"I made a lot of mistakes at the end of the second set," said Del Potro.
"He was right there and took his opportunities. He had nothing to lose and it was a tough match for me.
"I had all the pressure on me as I was the favourite. But at the end I managed to find my game again and played well. I'm just glad to be into a another final here."
Watch Roger Federer's final with Juan Martin del Potro live on Sky Sports 3 from 1.30pm.