Roger Kluge (IAM Cycling) caused an upset on a rare day for the sprinters in the back-end of the 2016 Giro d'Italia, after he made a solo attack within the final 500m of stage 17 to take the victory.
Steven Kruijswijk (LottoNL-Jumbo) retained his lead in the overall standings after finishing safely within the main bunch that followed in behind.
Kluge's win comes in a week which saw his IAM team announce they wouldn't continue after the end of the 2016 season and is their first WorldTour victory this year and a first ever Grand Tour stage win.
As the peloton entered the final kilometre together, it looked as though veteran Italian Filippo Pozzato (Wilier-South East) would be the one to claim the solo victory after he attacked shortly after the flamme rouge and gained 100m or so advantage.
But as he began to be dragged back closer to the peloton by the sprinter's teams, German Kluge made his move and quickly caught and passed Pozzato with a powerful ride.
As the sprint trains desperately tried to pull him back and the fast men launched their attacks, it was all too late as Kluge was able to sit-up and roll across the line in celebration.
Watch: Team Sky aim for stage wins in Giro final week
It's the first WorldTour victory for the 30-year-old, who has experienced most of his success on the track in his career.
Barely the only flat stage for the riders before the finale of the Giro in Turin on Sunday, most of the 17th stage was a straight forward instance of an early break gradually being pulled back.
Daniel Oss (BMC), Pavel Brutt (Tinkoff) and Eugert Zhupa (Wilier-Southeast) got away after just 2km and gained almost six minutes on the peloton, but that gap closed in to under a minute by the time they were within the final 30km.
They were joined by Maxim Belkov (Katusha), Lars Bak (Lotto-Soudal) and Ignatas Konovalovas (FDJ) shortly before the 20km to go mark and the six then managed to hold out a circa 20-second gap right until the final kilometre when Kluge launched his effort.
Red jersey leader Giacomo Nizzolo (Trek-Segafredo) continues to look for his first win at the Giro win after winning the sprint for second place, but will have to suffer through Thursday's 244km hilly finale and two further mountain stage to get to a final opportunity in Turin.
There were no significant changes in the overall classification after stage 17, with Esteban Chaves (Orica-GreenEdge) still 3-00 in deficit to pink jersey Kruijswijk.
Giro d'Italia 2016 stage 17, Molveno - Cassano d’Adda (196km)
1. Roger Kluge (Ger) IAM Cycling, in 4-31-29
2. Giacomo Nizzolo (Ita) Trek-Segafredo
3. Nikias Ardnt (Ger) Giant-Alpecin
4. Sacha Modolo (Ita) Lampre-Merida
5. Matteo Trentin (Ita) Etixx-Quick Step
6. Alexander Porsev (Rus) Katusha
7. Pim Ligthart (Ned) Lotto-Soudal
8. Ramunas Navardauskas (Ltu) Cannondale
9. Manuel Bellitti (Ita) Wilier-Southeast
10. Paolo Simion (Ita) Bardiani-CSF, all same time
Overall classification after stage 17
1. Steven Kruijswijk (Ned) LottoNL-Jumbo, 68-11-39
2. Esteban Chaves (Col) Orica-GreenEdge, at 3-00
3. Alejandro Valverde (Esp) Movistar, at 3-23
4. Vincenzo Nibali (Ita) Astana, at 4-43
5. Ilnur Zakarin (Rus) Katusha, at 4-50
6. Rafal Majka (Pol) Tinkoff, at 5-34
7. Bob Jungels (Lux) Etixx-Quick Step, at 7-57
8. Andrey Amador (Crc) Movistar, at 8-53
9. Domenico Pozzovivo (Ita) Ag2r La Mondiale, at 10-05
10. Kanstantin Siutsou (Blr) Dimension Data, at 11-03
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1