Taylor Fritz boosted his hopes of reaching the last four of the ATP finals with a comeback win against Australia's Alex de Minaur.
De Minaur had to defeat the fifth-seeded American in straight sets to have any chance of advancing to the semifinals in Turin, Italy.
However, his hopes were dashed when, against the run of play, Fritz stole the second set.
Fritz, who later won 5-7, 6-4, 6-3, will advance to the last four of the season-ending tournament when Jannik Sinner beats Daniil Medvedev later on Thursday.
If 2020 champion Medvedev wins in straight sets, the Russian will advance as group winner ahead of Italy's world number one Sinner, while Fritz is out.
“We're all pretty banged up, but being in the semi-finals of the World Tour Finals will give me some energy,” said Fritz.
The seventh-seeded De Minaur struggled in his first service games but was the first to get on the defensive when he ended an excellent rally with a clever cross-court winner to take a 4-3 lead.
Fritz reacted quickly and equalized in the next game before De Minaur broke again and served out the opening set while his opponent grew increasingly frustrated and complained to the referee about flash photography in the arena.
The US Open runner-up had to fend off two break points in the second set, while De Minaur looked comfortable in comparison with three love holds on serve.
Until Fritz increased his intensity and took his chance at 5:4 to end De Minaur's season.
With his tournament essentially over, De Minaur continued to falter while Fritz rose to secure victory with an ace after two hours and eight minutes.
“He was all over me. What I did great was toward the end of the second set I started to find my serve, I started serving a lot better,” Fritz said.
“It just gave me a little bit of comfort to stay in the game and not be under so much pressure. It was still incredibly hard.”