Rafael Nadal rallied to beat Nikolay Davydenko by 5-7, 6-4, 6-4 on Friday and set up a Masters Cup semifinal against top-ranked Roger Federer.
No. 2 Nadal is 6-2 career record against Federer, and is the only player in this elite eight-man draw with a winning record against the Swiss star.
Federer finished top of the Red Group round robin stage, unbeaten against Andy Roddick, defending champion David Nalbandian and Ivan Ljubicic.
Nadal lost to American James Blake in his opening match and recovered to beat fellow Spaniard Tommy Robredo and No. 3 Davydenko to qualify second from the Gold Group.
Blake assured of top spot in the group before his match later on Friday against No. 6 Robredo. He was set to play Nalbandian in the semifinals.
Davydenko ran out of energy in the deciding set, as he did after leading Blake by a set and break before losing his previous match. It was the first ever meeting between Nadal and Davydenko, ranked second and third ahead of the season-ending tournament. Nadal won five titles in six finals in 15 tournaments this year, while Russian Davydenko played 31 tournaments and collected five titles.
Davydenko controlled from the baseline in the first set, utilizing fast, flat ground strokes to work Nadal from side to side. After troubling Nadal's serve early, it was Davydenko who faced the first break points, needing to fend off three as he rallied from 0-40 to hold in the seventh game.
He held at love in the next game and then broke Nadal in the 12th game, finishing the first set in 66 minutes on the 20-year-old Spaniard's double-fault.
Nadal broke Davydenko to open the second set and held on to level at one set apiece.
He needed a medical time out after the second game of the third set for treatment just below his left knee.
But it did not appear to hinder him. He closed out in 2-hours, 43-minutes when Davydenko's forehand went out.
In doubles matches Friday, second-seeded Jonas Bjorkman and Max Mirnyi finished the Gold Group round-robin stage unbeaten with a 6-3, 7-6 (7) win over Fabrice Santoro and Nenad Zimonjic. Mark Knowles and Daniel Nestor also advanced 6-3, 6-3 over Poland pair Mariusz Fyrstenberg and Marcin Matkowski.
In the semifinals, Bjorkman-Mirnyi is against Martin Damm and Leander Paes, while Knowles and Nestor take on Red Group winner Paul Hanley and Kevin Ullyett.