Novak Djokovic survived a strong challenge from Juan Martin Del Potro to stretch his winning run to 19 matches and book his place in the semi-finals of the ATP World Tour Finals.
Although his pursuit of Rafa Nadal and the No1 spot in the rankings is over, Djokovic is still chasing the title at the O2 in London and he produced a battling display to emerge with a 6-3 3-6 6-3 victory.
A see-saw match went firmly Djokovic's way in the opening set, but the hard-hitting Del Potro came storming back in the second and, for the fourth time running between these two, the game went into a deciding set.
All the momentum was with Del Potro but from nowhere Djokovic got back to his best for the one crucial break in the third set that put him into the last four.
With Richard Gasquet out, his final match with Djokovic is no more than a dead rubber - as opposed to Del Potro's last group match against Roger Federer which will be a winner-takes-all shootout for a place in the semis.
Djokovic started the match by almost losing his serve as Del Potro fashioned two break points in the opener, but the second seed managed to fight his way out to hold.
The next two games went comfortably with serve but in the fourth game Djokovic upped the pace and forced three break points, but Del Potro found the answers on every one to fend them off and hold after a seven-minute game.
The Argentinian could not get out of jail in his next service game though, although he did save one break point Djokovic finally converted at the fifth time of asking to go 4-2 in front.
With the Serb right on top of matters, he served it out well and capped off the set with a second serve ace to go one in front after being in complete control for most of the set.
The match swung in Del Potro's favour in the second set, however, as he upped a gear at 2-2 with some thundering serves and forehands, and after going 3-2 in front he really put the pressure on the Djokovic serve.
After forcing two break points out of Djokovic in the sixth game, a timely net cord helped to hand him the break which he then converted into a 6-3 win to level and send the match into a final set.
Del Potro still held the edge, earning two break points after a Djokovic double fault in the third game of the decider, but Djokovic managed to dig deep to hold serve.
Then, almost from nowhere, Djokovic found his best again to break a stunned Del Potro to love and go 4-2 in front, and the writing was on the wall as Djokovic served it out to win 6-3 3-6 6-3.