World number one Roger Federer survived a difficult first set before beating unseeded compatriot Marco Chiudinelli to reach the final of his hometown Swiss Indoors in Basel on Saturday.
He will face third-ranked Novak Djokovic, who pulled off an even more impressive survival act by saving three match points before beating Radek Stepanek 6-7, 7-5, 6-2.
Federer, facing an opponent who has rocketed up more than 800 places up the world rankings in the last year to 73rd, saved a set point in the first set tiebreak before going on to win 7-6, 6-3 against the Swiss number three.
With Chiudinelli serving for the set, Federer produced a stunning crosscourt backhand pass and followed that up with an ace. Chiudinelli then blasted a forehand out to give Federer the set.
The rank outsider had more than held his own during the first set when he also had three break points in the eighth game.
Having missed his chances, the second set went to script as Federer brushed aside his less illustrious countryman to move within one match of his fourth successive title in Basel.
"It's a very emotional tournament for me," said Federer, who was once a ball boy at the event. "It's one of the priorities where I try to stay fit."
"You have to be very focused on this surface," added Federer, who took a six-week break before this tournament.
"I think I'm ready for a difficult match."
RELIEVED DJOKOVIC
Djokovic was a relieved man after battling against his own serving problems.
"I served quite badly throughout the match and on this surface its crucial to serve well," Djokovic told reporters. "It was a very difficult match."
Neither player managed a break in the first set and in the ensuing tiebreak Czech Stepanek went 5-2 up.
Although Djokovic managed to pull two points back, he then produced two unforced errors to hand Stepanek the set.
The second set also went with serve until the dramatic 10th game when Stepanek held a 40-0 lead and three match points after some erratic serving from the Serb.
Djokovic regained his composure and managed to save all three to hold serve, then broke his opponent in the following game with a crosscourt pass.
"That game was terrible for me," said Djokovic. "I just tried to get some first serves in and managed to do it."
The Serb produced another break at the start of the third set as the clearly shaken Stepanek, who had dominated much of the match, lost his nerve.