Novak Djokovic out-battled Alexander Zverev to qualify for the last four at the ATP Finals on Friday, staying on track to match Roger Federer's record of six titles at the end-of-season event.
The Serbian top seed, who was beaten comprehensively by Daniil Medvedev in his second round-robin match, was again below his best in London but did enough to win 6-3, 7-6 (7/4).
In the evening match at the elite eight-man event, which was a dead rubber, Russian fourth seed Medvedev beat debutant Diego Schwartzman 6-3, 6-3.
In a repeat of the 2018 championship match, Djokovic saved all three break points he faced to gain revenge against the German, and will face Group London 2020 winner Dominic Thiem in the semi-finals.
Medvedev, who topped Group Tokyo 1970, will meet Spanish second seed Rafael Nadal in the other last-four clash at the empty O2 Arena.
The group-stage results mean the four top-ranked players in the world will all be involved in Saturday's semis.
Djokovic has already tied Pete Sampras's record mark of six year-end number-one finishes and is eyeing Federer's record at the season finale.
The top seed broke Zverev at the first time of asking and raced into a 3-0 lead, threatening to run away with the match.
The 33-year-old looked focused after his uncharacteristic mauling by Medvedev, serving himself out of trouble when he found himself trailing 15-40 in the seventh game.
That proved to be the last chance for Zverev in the set and 17-time Grand Slam winner Djokovic hammered a backhand winner down the line to take it 6-3.
Djokovic handed Zverev a break point in the fourth game of the second set after double-faulting but the German could not capitalise.
The 23-year-old fifth seed saved two break points on his serve in the following game, letting out a roar as he kept his nose in front.
The set went to a tie-break. Zverev earned an early mini-break but Djokovic levelled and the pressure was back on the German, who faltered to hand the Serbian victory.
Djokovic said he had managed to find the right shots at the right moments, in contrast to his performance against Medvedev.
- Thiem match-up -
He said Austrian third seed Thiem, who won his first Grand Slam at the US Open in September, would be a tough opponent.
"Obviously, earlier in his career he played his best on clay but of course being one of the hardest workers on the tour, the most dedicated players, Dominic found his 'A' game on all other surfaces," said Djokovic.
"His first Slam came on hard courts earlier this year in New York. I played him last year here -- I lost 7-6 in the third set. It was really a thrilling match. Hopefully we can have another great match but this time with a different outcome."
Medvedev's victory against Argentine eighth seed Schwartzman gave him three wins out of three in the group stage -- a far cry from his debut last year, when he lost all three matches.
The Russian, who is on a hot streak after winning the Paris Masters earlier this month, found some astonishing angles in a breathtaking display of hitting.
The giant Medvedev, 28 centimetres taller than Schwartzman, who stands just five feet seven inches tall (170 cm), broke twice in the first set and once in the second.
"It's always good to stay undefeated for the confidence," he said. "I wanted to win the match, so really happy that I've done it. I think I was serving pretty good today, so that helped me a lot."