Roger Federer made it three ATP World Tour Finals wins out of three to secure top spot in Group Stan Smith and knock Kei Nishikori out of the tournament on Thursday.
Federer ended world number one Novak Djokovic's three-year unbeaten run indoors on Tuesday to qualify for the semi-finals and saw off a resilient Nishikori 7-5 4-6 6-4 at London's O2 Arena two days later.
The legendary Swiss was not at his brilliant best against the eighth seed from Japan, who fought back from 4-1 down in the second set to force a decider but was unable to secure the win he needed to have any chance of reaching the last four.
Djokovic and Tomas Berdych will do battle in the final Group Stan Smith match later in the day with a place in the semi-finals at stake.
A vibrant Nishikori showed great character to battle back from 3-1 down by winning three games in a row to go a break up at 4-3, racing around the court at speed and using his whippy backhand with great effect.
That only succeeded in spurring Federer back into life, though, and the 17-time grand-slam champion wrapped up the set by winning a gripping and high-quality 12th game when Nishikori netted a backhand.
Federer conjured up some breathtaking backhands as he eased into a 4-1 lead in the second set, but found himself 5-4 down after astonishingly sending a simple forehand a long way wide and then netting to go a break down and enable Nishikori to serve out the set.
There was a sense of deja vu when third seed Federer again let a 4-1 advantage slip to be pegged back as Nishikori refused to accept defeat in an entertaining contest, but the favourite won his first match point with an overhead smash to finally seal his 51st victory in this competition.
Federer  bt Nishikori  7-5 4-6 6-4
Federer - 10
Nishikori - 2
BREAK POINTS WON
Federer - 6/6
Nishikori - 5/12
FIRST SERVE PERCENTAGE
Federer - 54
Nishikori - 57
PERCENTAGE OF POINTS WON ON FIRST/SECOND SERVE
Federer - 84/30
Nishikori - 70/41
Federer - 96
Nishikori - 93