Roger Federer was turfed out of the Shanghai Masters semi-finals on Saturday by 13th-seeded Borna Coric, the Croatian stunning the Swiss great 6-4, 6-4.
The 21-year-old Coric will face Novak Djokovic in Sunday's final after the Serb thrashed Alexander Zverev 6-2, 6-1, leapfrogging Federer to number two in the world rankings.
The 20-time Grand Slam champion Federer has not been at his brilliant best all week, dropping sets in the two opening matches of his wobbly title defence.
The 37-year-old top seed was more like his old self on Friday, defeating eighth seed Kei Nishikori of Japan 6-4, 7-6 (7/4).
But he made a slow start against Coric, ranked 19 in the world, getting broken in the first game in an error-strewn performance.
There was a subtle shake of the head when Federer similarly lost his serve at the start of the second set.
In contrast, Coric -- who is into his first Masters 1000 final -- was largely untroubled on his serve.
Federer won the Australian Open at the start of this year but has had a mediocre season by his sky-high standards.
He exited the US Open in the last 16 at the hands of unheralded Australian John Millman, ranked 55th, and only made the quarter-finals at Wimbledon.
Coric, who has only two career titles to his name, has now beaten Federer twice -- the previous time was in the final at Halle this year.