Stefanos Tsitsipas celebrates his quarter-final win over Novak Djokovic ©Getty Images

Greece's Stefanos Tsitsipas claimed a shock win over world number one and defending champion Novak Djokovic to reach the semi-finals of the Shanghai Masters.

The sixth seed recovered from a slow start to record the biggest victory of his career, prevailing 3-6, 7-5, 6-3 in two hours and three minutes at the season's penultimate Association of Tennis Professionals (ATP) Masters 1000 tournament at the Qizhong Forest Sports City Arena.

Next up for him is third-seeded Russian Daniil Medvedev, who beat Italy's Fabio Fognini 6-3, 7-6.

Medvedev's win meant Tsitsipas became the sixth player to clinch a spot at next month’s ATP Finals in London.

But the 21-year-old Greek did not know that when walking onto court to face Djokovic, who now trails Spain's Rafael Nadal by 1,280 points in the battle for year-end world number one.

Djokovic, the winner of last week's Japan Open, is aiming to finish the year in top spot for the sixth time.

It is the second time in three meetings the Serb has lost to Tsitsipas having fallen to a three-set defeat in the third round of last year's Rogers Cup in Toronto.

"[Tsitsipas] had the high-quality tennis and he played very well after his serve," Djokovic, who won the pair's last encounter in the Madrid Open final in May, said. 

"He was backing up his serve with really good and aggressive first shots in the rally."

Germany's Alexander Zverev beat Swiss legend Roger Federer in the quarter-finals ©Getty Images
Germany's Alexander Zverev beat Swiss legend Roger Federer in the quarter-finals ©Getty Images

He added: "I didn't make him defend enough. 

"I just gave him enough time to really dictate the play from the back of the court and he deserved to win."

Tsitsipas' previous best result by ATP ranking came in May, when he beat number two Nadal in the Madrid Open semi-finals.

The other semi-final in Shanghai pits fifth-seeded German Alexander Zverev against 11th-seeded Italian Matteo Berrettini.

Zverev ousted Swiss legend Roger Federer, a two-time champion in the Chinese city, with a 6-3, 6-7, 6-3 victory, while Berrettini defeated fourth-seeded Austrian Dominic Thiem.

Federer, seeded second, was deducted a point after he twice hit the ball out of the court in anger.

The 38-year-old saved five match points against Zverev in the second set but got involved in a continuing argument with the chair umpire.

He was given a point penalty when trailing 3-0 in the final set.

Action in Shanghai continues tomorrow.