London - Kei Nishikori faces a nervous wait to see if he will qualify for the semi-finals of the ATP Tour Finals after finishing his Group B campaign with a 4-6, 6-4, 6-1 victory over David Ferrer on Thursday.
Nishikori discovered just before his match was due to start that he would face Ferrer instead of his scheduled opponent Milos Raonic after the Canadian pulled out with a torn quad.
But the Japanese star wasn't fazed by that late switch and he recovered from a set down to secure his second win on his debut appearance in the season-ending tournament at London's O2 Arena.
His fate is now in the hands of Roger Federer, who is already through to the last four and can seal Nishikori's place as group runner-up if he beats Andy Murray later on Thursday.
US Open finalist Nishikori, who saw off Ferrer with 41 winners in just under two hours on court, would also qualify in second place if Murray beats Federer in three sets, but he will be eliminated if the Scot wins in straight sets.
"The third set was almost perfect. I served well and everything worked well," Nishikori said.
"It was really difficult to make this adjustment (to face Ferrer). They told me one hour before the match.
"It was tough to change tactics but I'd prepared well and I'm happy to win."
World number 10 Ferrer, who had been practising at the O2 Arena all week in case of injury withdrawals, was well-compensated for his brief role, making $85 000 for being an alternate as well as a $155 000 appearance fee.
Although Nishikori was initially perturbed by Ferrer's presence, he knew he had won all three of their previous meetings this year, including from a set and 5-2 down at the recent Paris Masters.
He had the first break point in the fifth game, but Ferrer was able to battle his way to a hold.
It seemed that would be only a minor inconvenience when Nishikori earned a break point with a brilliant volley and converted it with a superb forehand cross-court winner for a 4-3 lead.
But, with the set in his grasp, Nishikori suddenly lost his rhythm and Ferrer broke back before capitalising on another sloppy service game to take the set when the Japanese player netted an overhead shot.
Nishikori's response was emphatic and he broke Ferrer in the first game of a second set which he won in comfortable fashion.
For the first time in nine matches at this year's event, a final set was necessary and that benefitted Nishikori, who had won 20 of 22 deciding sets in 2014.
Nishikori has been struggling with a right wrist problem this week and looked in discomfort as he grimaced at times between points.
But he battled on and landed the knock-out blow with a double break in the first and third games to seal the win.