Novak Djokovic remained unbeaten at the ATP finals on Friday after a battling 6-3, 6-7 (5/7) 7-6 (7/2) win over Daniil Medvedev.
Djokovic went into the Red Group dead tie already assured of his place in the semi-finals after wins over Andrey Rublev and Stefanos Tsitsipas.
Medvedev in contrast was already eliminated after losses in both his outings on the hardcourt in Turin.
Djokovic faces American Taylor Fritz on Saturday with the second semi-final between Casper Ruud and the winner of Friday's late game between Tsitsipas and Rublev.
After having to dig deep into his mental and physical reserves Djokovic said: "Daniil and I have had some battles in the past and I knew coming into the match that it was going to be his last match of the season and he wouldn't want to finish with a loss."
With both players trading punches like heavyweights in the ring Djokovic took the first set only for Medvedev to force a decider sealing the second set on his fourth set point.
Djokovic rallied back from a break down to earn his 40th tour-level win of the season after three hours and five minutes.
"I started off very well. I had chances in the second set, had some break points but he played very well in those decisive points," he said.
"He was playing really quick. I didn't feel physically well in the third set, struggled a lot. It is a battle and it is a fight."
The 35-year-old is aiming to tie Roger Federer’s record six triumphs at the tournament, which is being held in Turin for the second time.
The former World No. 1 has now won 16 of his past 17 matches, having triumphed in Tel Aviv and Astana last month.
Aside from his three on court wins this week, he was boosted by the news that he has been granted a visa to play in the Australian Open in January.
He was kicked out of the country in the lead-up to the Melbourne Grand Slam earlier this year after refusing to be vaccinated against Covid-19.