Roger Federer will take on Novak Djokovic in the final of the Swiss Indoors as he tries for a fourth straight title in his hometown tournament.

Djokovic saved three match points before rallying to beat Radek Stepanek 6-7 (4), 7-5, 6-2 in their semifinal on Saturday. Federer then beat childhood friend and fellow Basel-native Marco Chiudinelli 7-6 (7), 6-3 in the other.

“I’m ready for a tough match. Novak’s played solid tennis during the week,” said Federer.

They’ve split four matches this year, with Federer winning their last meeting in straight sets in the U.S. Open semifinals.

“Obviously the home crowd will be behind him,” Djokovic said of playing Federer in the St. Jakobshalle, where the 28-year-old Swiss was once a ballboy.

Djokovic trailed 5-4 in the second set and was 0-40 down before reeling off five straight points to win the game.

“I wouldn’t say necessarily it was my good shots that prevented the loss. It was luck only,” Djokovic said. “I just tried to get some first serves in and at least get that advantage. On this (hard court) surface, it’s crucial.”

He then broke the 14th-ranked Stepanek’s serve for the first time before dominating the decider.

Chiudinelli had a set point in a thrilling first-set tiebreaker, but Federer struck a backhand crosscourt winner as his opponent advanced to the net, then took the next two points.

Federer broke serve early in the second set and quickly closed out the win. He has progressed without dropping serve in four matches, though Djokovic will be his first seeded opponent.

“I’m happy where I’m at,” the top-ranked Swiss said. “I hope to pick up even more speed with the last match remaining.”

Chiudinelli was playing in the first semifinal of his injury-affected career, and earned a place in the main draw of next week’s Paris Masters.

But the 30-year-old Czech forced him to save two break points in the opening game, and took control of the first-set tiebreaker with a pair of overhead winners.

Djokovic’s first serves faltered in the second set, and a double fault gave Stepanek three match points.

Djokovic responded with heavy serves and ground strokes, and needed just one set point on his next service game. He converted it with a forehand winner.

In the decider, Djokovic got service breaks in the first and seventh games before closing out victory.

More In: Tennis | Sport