Juan Martin Del Potro booked his place in the semi-finals of the ATP World Tour Finals after a superb win over Roger Federer.
The Argentine sixth seed won the first set on a tie-break and, after world number two Federer had levelled at 1-1, Del Potro landed the decider to wrap up a 7-6 (7/3) 4-6 6-3 victory at the packed O2 Arena.
The first set went with serve through to the tie-break which Del Potro took hold of after two forehand errors from Federer helped him build a commanding 6-1 lead.
The Swiss ace saved two set points but it was only a stay of execution as Del Potro closed out the opener in 52 minutes.
Federer, who has won this title for the last two years, already knew he was through after winning his first two group matches and hit back hard at the start of the second set, winning eight points in succession to race into a 2-0 lead.
The big-serving Del Potro found his rhythm again but Federer kept his nose in front to win it 6-4 and force a decider.
But, needing to win the match to guarantee his place in the last four, Del Potro raised his game and broke Federer for the first time at the start of the final set to move into a 2-0 lead.
It was an advantage he never relinquished and some trademark big serving from Del Petro saw him close out the 17-time Grand Slam champion 6-3 in the final set.
Although both Del Potro and Federer are guaranteed the top two spots in Group B, the order will be decided by the outcome of Saturday evening's clash between David Ferrer and Janko Tipsarevic.
If Ferrer wins, the semi-final line-up would be Federer v Andy Murray and Del Potro v Novak Djokovic. A win for Tipsarevic would mean Del Potro v Murray and Federer v Djokovic.