BASEL, Switzerland (AP) Roger Federer will face Rafael Nadal in a final for the first time in 2 1/2 years on Sunday.

The tennis greats both had straight-sets wins Saturday to set up a Swiss Indoors title match that is their first on-court meeting since January 2014, and first final since May 2013.

For extra emotion, the 34th chapter in their great rivalry is at Federer's hometown tournament where Nadal has never faced the local hero, who was once a ball boy here.

''It's fantastic for the fans, for the tournament ... and for both of us,'' said the top-seeded Federer, after easing to a 6-3, 6-4 win against unseeded American Jack Sock in the semifinals. ''Today I was in control so I feel like I have a good shot tomorrow.''

Earlier, the third-seeded Nadal played his best tennis of the week in beating Richard Gasquet of France 6-4, 7-6 (7).

''It's another final against an amazing player,'' said Nadal, adding he was excited about ''an opportunity to play a match that is special.''

The 29-year-old Spaniard has a 23-10 career hold over Federer, including straight-sets wins in their last title match - the Rome Masters final in May 2013 - and last competitive meeting in the Australian Open semifinals.

Still, Nadal knows he is not favored by the surface he will find Sunday.

Federer is a six-time winner at Basel while just one of Nadal's 67 career titles was on indoor hard courts - in Madrid in 2005.

''It's a long time ago, you probably forget it,'' Nadal quipped to reporters. ''I don't have the ideal opponent to win again, but I won on grass (in Stuttgart) after a couple of years without winning.''

Federer cautioned against underestimating Nadal, who has endured several injuries since their rivalry peaked in the last decade.

''I think he has played pretty well (here),'' said the 34-year-old Federer, noting with disdain ''the rumors that he can't play tennis anymore at the beginning of the week.''

After three straight three-set matches at Basel, Nadal finally got a more straightforward win Saturday though his problem holding serve early in sets continued.

Nadal dropped the opening game each time to Gasquet, and seemed in trouble trailing 4-3 in the first set when he called for the trainer at a changeover.

Returning with tape below his right knee, Nadal quickly recovered and broke Gasquet's serve twice to take the first set, clinching it with a fierce forehand topspin passing shot.

"I had one scary moment but then it's fine,'' said Nadal. ''I am happy with the way the knee answers after that.''

Gasquet needed seven break points to take a 1-0 lead in the second, and Nadal leveled when the fifth-seeded Frenchman served for the set leading 5-4.

Federer had a smoother path, and Sock did well to stretch the match beyond one hour when Federer was two points from victory serving with a 5-2 lead.

The 29th-ranked American reeled off three straight returns for winners to break serve for the only time. Federer clinched without fuss in his next service game.