Six-time champion Roger Federer has booked his place in the last four of the ATP World Tour Finals by beating Juan Martin del Potro 4-6 7-6 7-5 at London's O2 Arena.
The result means that Federer, who will face world number one Rafael Nadal on Sunday, has now reached the semi-final stage of the season-ending event on 11 occasions.
Meanwhile, Del Potro's second defeat of the week sees him exit the competition, having finished third in Group B.
Federer made a sluggish start to the winner-takes-all match, as his misfiring forehand allowed Del Potro to take the opening three points. That provided the Argentine with three break points, the third of which was converted.
Del Potro broke again in game five, after Federer had surrendered a 40-0 lead. The 2009 US Open champion then won his third consecutive service game to move 5-1 ahead.
A ten-minute spell of brilliance from Federer saw the 17-time Grand Slam winner win 12 out of 13 points to close the gap on his opponent to just one game.
Federer then piled more pressure on Del Potro, forcing two break points in game 10, but the world number five came up with three timely aces to hang onto his serve and secure the opening set.
Del Potro was again first to strike in set two, breaking in game three before going on to build a 3-1 lead.
However, Federer fought back once more, earning his second love service break of the match to level the set at 3-3.
The next six games went with serve to set up a tie-break, which Federer dominated and eventually won 7-2.
Del Potro was far from at his best during the breaker, but he soon raised his level of performance when the deciding set got underway, powering his way to a 3-0 one-break lead.
However, just as had happened in the previous set, Federer fought back to level at 3-3, before going on to break again in game 11.
Federer then ended the 147-minute tussle by holding to 40 after saving break point.
He joins countryman Stanislas Wawrinka in the semi-finals, meaning that there are two Swiss players in the the last four of the ATP World Tour Finals for the first time ever.
Wawrinka's semi-final opponent will be defending champion Novak Djokovic.