Rafael Nadal was joined by debutant Stanislas Wawrinka in the ATP World Tour semi-finals after both won their final group matches in London.
Wawrinka battled to a 6-7 (3-7) 6-4 6-1 victory against David Ferrer to keep his hopes alive.
The Swiss then needed Nadal to win and the world number one beat Tomas Berdych 6-4 1-6 6-3 in the last Group A match.
Novak Djokovic is already through from Group B, and will be joined by Roger Federer or Juan Martin Del Potro.
Those two face a straight shoot-out for a place in the last four on Saturday, but Wawrinka had a more complicated task on Friday.
He did his part against an exhausted Ferrer, who admitted afterwards he had played "too much" in recent weeks.
The Spaniard found the energy to recover from 5-2 down and take the first set in a tie-break, but from the moment he was broken early in the second - and smashed his racquet in fury - the world number three's challenge began to fade.
Wawrinka, 28, was not at his fluent best and passed the 40-mark for unforced errors, but Ferrer simply did not have anything left and lost seven of the last nine games.
"I played a lot of tournaments," admitted Ferrer after an ATP-leading 84th match of 2013.
"I played seven tournaments in seven weeks. It's too much. But now I know it's too much. Before, I never knew it. I made three finals in three weeks."
Nadal had won his last 15 matches against Berdych stretching back to 2006, and when he thumped two forehand winners on his way to breaking in the opening game, the streak looked sure to continue.
That break was enough to give Nadal the first set and ensure the Spaniard would win the group - and so avoid Djokovic in the semi-finals - but what followed must have alarmed Wawrinka.
Berdych got an early break in the second set and stunned most of the 17,000 spectators by racing through it in 29 minutes for the loss of one game, with just one unforced error.
The last time Berdych beat Nadal he was jeered off the court by a furious Madrid crowd, but 15 defeats and seven years later the Czech had a growing level of support in the O2 Arena as the prospect grew of his miserable run ending.
There was no sympathy across the net, however, and after six tight games the world number one rediscovered the vicious bite on his forehand.
Berdych's resolve wavered with two disastrous double-faults, the second on break point, and within the space of five minutes Nadal turned a tense decider into another victory, whipping a classic forehand winner on match point.
"It's true that after the first set I knew that I already had the first goal converted, being the first of the group," said Nadal.
"But at the end it was just winning a set, the only thing that I had was that. No points, no confidence if I didn't finish the match playing like I had played.
"So it was important to finish the match the way that I did. I'm very happy for that."