Rafal Nadal has kept his hopes alive of progressing to the last-four of the season-ending ATP Tour Finals in London.
He fought back from 5-1 down in the final set to defeat Daniil Medvedev 6-7, 6-3, 7-6
The Spanish world number one must now beat Stefanos Tsitsipas on Friday to have a chance of advancing.
Tsitsipas, who is making his debut at the tournament, has already reached the semifinal after beating defending champion Alexander Zverev 6-3, 6-2.