Jakob Fuglsang produced a stunning ride on the final stage of the Criterium du Dauphine to snatch overall victory from Richie Porte by 10 seconds.
The Dane trailed Porte by one minute and 15 seconds after the opening seven days of the race but after cancelling out that deficit, the help of bonus seconds for the stage win saw him take the title.
Porte's quest for success began to unravel on Sunday's second descent as Fuglsang and Chris Froome were part of the group that distanced the Australian.
With 10 kilometres to go it was Froome in the virtual lead as Porte sat over a minute behind him, but the BMC Racing rider dug deep and summoned the strength to eventually catch the Briton.
However, Froome was not his only threat as Fuglsang pushed clear - initially with Dan Martin, who finished third in the general classification, and then on his own - and began to open up a race-winning advantage.
Still Porte battled but it was in vain as Fuglsang claimed his second stage win of the week and the crucial bonus seconds to top the GC.
Thomas De Gendt had held the race lead for the first five days before Porte assumed control, the Australian having won the time trial before pulling clear in the mountains.
He replaced De Gendt at the summit after stage six and extended his advantage on Saturday with an attack on the final ascent up the iconic Alpe d'Huez.
It looked like being enough despite the gradients on the final stage but Fuglsang threw a spanner in the works, cementing his place as a contender for the Tour de France.
For Froome, who ended fourth, there will be disappointment at missing out on the race win - especially because he has won the Dauphine before each of his three Tour de France victories - but he, like Fuglsang, looks in fine fettle ahead of the Grand Depart on July 1.
1. Jakob Fuglsang (Astana) 29:05:54
2. Richie Porte (BMC Racing) +0:10
3. Dan Martin (Quick-Step Floors) +1:32
4. Chris Froome (Team Sky) +1:33
5. Fabio Aru (Astana) +1:37
1. Arnaud Demare (FDJ) 59 points
2. Phil Bauhaus (Team Sunweb) 47 points
3. Bryan Coquard (Direct Energie) 36 points
KING OF THE MOUNTAINS
1. Koen Bouwman (LottoNL-Jumbo) 44 points
2. Fabio Aru (Astana) 29 points
3. Ben Swift (UAE Team Emirates) 29 points