Ireland's Sam Bennett won a sprint finish on the Imola racing circuit to take stage 12 of the Giro d'Italia.
In dire conditions, what should have been 214km of build-up to a bunch sprint instead became another thriller.
And the 27-year-old Bennett judged his move to perfection to take the win from Danny van Poppel and Niccolo Bonifazio.
Britain's Simon Yates, who won Wednesday's stage into Osimo, maintains his overall lead on Tom Dumoulin at 47 seconds.
Bennett, who also won stage seven into Praia a Mare, becomes the first Irishman to win multiple stages at one of the sport's Grand Tours since the great Sean Kelly at the Vuelta a Espana of 1988.
He said: "It was a tough finale. I didn't know how much energy the two riders in front had left at the end.
"I decided to go early - I didn't know if I could hold it but I think I caught a few by surprise so that worked to my advantage."
Heavy rain had begun to fall with just over an hour of racing to go, and caused splits in the peloton as the roads filled with standing water and spray kicked up from the wheels.
Quick-step Floors' Italian sprinter Elia Viviani, winner of two sprint stages in the Giro's first week and one of the favourites for this stage, was one of those caught out, and Bennett's Bora-Hansgrohe team went to the front of the main group to drive the pace on.
Yates was being well protected by his Mitchelton-Scott team-mates as the pack approached the final 15 kilometres on the racetrack.
Tim Wellens was the first to make a move but was caught with 10km to go as lightning strikes flashed in the darkening sky.
The course then left the circuit for a brief climb and Carlos Betancur and Diego Ulissi were the next to make a move, holding a slim six-second lead on a twisty, sodden descent before Matej Mohoric went to the front.
But Bennett's power took him clear as he launched a long sprint with 400 metres to go, with none of his rivals able to stay with him.
Bennett's win narrows Viviani's lead in the points classification, with another sprinters' stage to come on Friday before the race takes on the fearsome Zoncolan climb on Saturday.
Stage 12 result:
1. Sam Bennett (Irl/Bora-Hansgrohe) 4hrs 49mins 34secs
2. Danny van Poppel (Ned/LottoNL-Jumbo) same time
3. Niccolo Bonifazio (Ita/Bahrain-Merida)
4. Baptiste Planckaert (Bel/Katusha-Alpecin)
5. Jurgen Roelandts (Bel/BMC Racing Team)
6. Michael Morkov (Den/Quick-Step Floors)
7. Manuel Belletti (Ita/Androni Giocattoli-Sidermec)
8. Clement Venturini (Fra/AG2R La Mondiale)
9. Florian Senechal (Fra/Quick-Step Floors)
10. Enrico Battaglin (Ita/LottoNL-Jumbo)
Overall standing after stage 12:
1. Simon Yates (GB/Mitchelton-Scott) 51hrs 57mins 55secs
2. Tom Dumoulin (Ned/Team Sunweb) +47secs
3. Thibaut Pinot (Fra/Groupama-FDJ) +1min 4secs
4. Domenico Pozzovivo (Ita/Bahrain-Merida) +1min 18secs
5. Richard Carapaz (Ecu/Movistar) +1min 56secs
6. George Bennett (NZ/LottoNL-Jumbo) +2mins 9secs
7. Rohan Dennis (Aus/BMC Racing Team) +2mins 36secs
8. Pello Bilbao (Spa/Astana Pro Team) +2mins 54secs
9. Patrick Konrad (Aut/Bora-Hansgrohe) +2mins 55secs
10. Fabio Aru (Ita/UAE Team Emirates) +3mins 10secs