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
Richard began working with Cycling Weekly in 2013 alongside the then web editor, Nigel Wynn. Taking over as digital editor or Cycling Weekly and mbr in 2014, Richard coordinates site content and strategy with the team.
Adam Yates 'didn't have the legs' as he secures top 10 at Tokyo Olympics road race
The Brit was the first to open his sprint for second despite not being the fastest finisher of the chase group
By Jonny Long •
Tokyo Olympics men's road race LIVE: Musashinonomori Park to Fuji International Speedway
Live updates from the first cycling event of the Tokyo games
By Alex Ballinger •
IAM Cycling rider fearful over missed doping test at Giro d'Italia
Stef Clement missed a doping control at the end of stage 12 of the Giro d'Italia because the finish line was too crowded and he finished 17 minutes behind
By Stuart Clarke •