Roger Federer has missed out on the chance to win his 100th career title at Wimbledon next month after losing the Halle Open final in Germany.
Defending champion Federer was a strong bet to rack up title No.99 at the grasscourt tournament but was beaten 7-6 (8-6) 3-6 6-2 by Croatian Borna Coric.
It ends a 20-match winning streak on grass since last year's Wimbledon and also means Rafael Nadal will replace Federer, who was chasing a 10th title at Halle, at the top of the world rankings.
It was also Coric's first win over Federer in his third attempt and the Croatian's second ATP title.
Federer, appearing in his 12th Halle final, surrendered two set points in a first set tie-break to fall behind.
But a costly net fault from the 21-year-old Coric allowed Federer to even up the affair in the second set. The 36-year-old Swiss conceded the match with a backhand net error on serve in the third set after two hours and four minutes.
Coric played Federer as recently as March in the Indian Wells semi-finals before Federer made the decision to take a three-month competitive break from the sport during the clay season.
The 21-year-old Coric, who defeated second seed Alexander Zverev earlier this week, advanced to the decider after playing just five games of his semi-final against Robert Bautista Agut.
The Spaniard was forced to retire after an unfortunate slip, with Coric serving at 2-3.