Rafael Nadal missed out on reaching the semi-finals of the ATP Finals despite battling back from a set down for the second match in a row to beat Stefanos Tsitsipas.
Nadal, who needed to beat the already-qualified Greek to stand a chance of progressing, won 6-7 (4-7) 6-4 7-5 in the afternoon session and then required Daniil Medvedev to defeat Alexander Zverev in the final round-robin match.
However, defending champion Zverev overcame US Open runner-up Medvedev in 6-4 7-6 (7-4) to prevent the Spaniard from facing long-time rival Roger Federer in the last four.
Nadal was already assured to finish as the year-end world No 1 ahead of this final round-robin match due to Roger Federer's victory over Novak Djokovic, however, thoughts of that looked far from his mind as he stepped onto court.
Instead his focus was fixed on Tsitsipas who hadn't lost a set at this year's ATP Finals and who had already qualified for the last four as a result of back-to-back victories over Zverev and Medvedev.
At the start of the two-hour-and-52-minute match, Nadal and Tsitsipas were rock solid on their own before the Spaniard created a window of opportunity to break in the seventh game.
He failed to take advantage of the 15-30 position though as he missed an angled cross-court forehand which is usually his bread and butter.
Tsitsipas responded by putting his own skills, of attacking forwards and of finishing at net, to work. He swiftly gained points back and duly brought about four games all.
From there, a tie-break to decide the opening set looked to be inevitable and when it did arrive after 49 minutes, the Greek player handled the clutch points with the air of a man who's at the top of his game.
His energy and ball striking brought about a 4-2 lead at the change of ends and when he nailed an ace at 6-4, the young man pumped the air and raced back to his chair with the set in his corner.
Nadal, with the memories of his comeback against Medvedev fresh in his mind, created the first break points of the match in the fourth game of the second set.
Although he couldn't convert them, he retained his focus and gained the break a short time later.
The crowd roared as he upped the pressure on the Greek, moved 5-4 ahead and then served out the second set to take the encounter to an enthralling decider.
Nadal lost against Zverev in his opening round-robin match on Monday
With Nadal's new level of performance and sheer determination powering his game, Tsitsipas grew in stature too.
He held off break points in the fifth game of the final set with his winning combination of wide serves and monster second shots.
However, Nadal continued to make life challenging for him and attacked from all areas of the court. His athletic ability came to the fore as their battle of wills continued to play out.
Ultimately the thriller was going to come down to the finest of margins and the world No 1 used his world-leading forehand to swing things in his favour and to create what would be the match-winning break.
A round the net post, down-the-line stormer, brought about a chance to break at 5-5, 30-40.
He didn't convert that but gained the advantage and launched another ripper of a forehand to force the error from Tsitsipas on the volley.
From there Nadal held with aplomb and jumped high into the air as he victory was confirmed.