Roger Federer returns the ball to Kei Nishikori during the ATP Tour Finals match.
London - Federer had already clinched a record 13th Tour Finals semifinal place after ending Novak Djokovic's three-month, 23-match winning run on Tuesday.
Roger Federer knocked Japan's Kei Nishikori out of the ATP Tour Finals and guaranteed top spot in his group with a 7-5, 4-6, 6-4 victory on Thursday.
Federer had already clinched a record 13th Tour Finals semifinal place after ending Novak Djokovic's three-month, 23-match winning run on Tuesday.
But the 34-year-old still needed to beat Nishikori to be certain of advancing as the group winner and he finished the job in two hours and 10 minutes of gruelling action to secure his third successive victory at the prestigious season-ending event at London's O2 Arena.
Federer, who has won the Tour Finals a record six times, will face either Andy Murray or Stan Wawrinka in the last four on Saturday. Murray and Wawrinka clash on Friday to determine the second qualifier from the other group, which has already been won by Rafael Nadal.
The second semi-finalist from Federer's group will be decided later on Thursday when world number one Djokovic plays Tomas Berdych.
Defending champion Djokovic will be through if he wins in two or three sets and he would still qualify if he loses in three sets, with only a straight sets win for Berdych enough to send the Czech in the last four.
Nishikori's last meeting with Federer had also been at the Tour Finals 12 months ago and ended in a heavy defeat for the Japanese star.
This time the 25-year-old put up much more of a fight, but once again he was denied a third career win over the player he grew up idolising. Nishikori has struggled with a host of injuries during a disappointing 2015 and, still troubled by fitness issues this week, he could have allowed his season to fizzle out when a wayward backhand gifted Federer a break in the fourth game of the first set.
But Nishikori is too spirited a competitor for that and he broke back in the next game.
Nishikori broke again in the seventh game, converting with a ferocious crosscourt winner that left his opponent rooted to the spot.
Yet as suddenly as Nishikori had seized the advantage, he found it vanished just as quickly as Federer took advantage of a sloppy service game to break again.
Unable to find a solution to Federer's pressure, Nishikori finally wilted in the 12th game with a pair of unforced errors surrendering the first set.