Germany's Pascal Ackermann took his second stage victory at this year's Giro d'Italia, as former champion Tom Dumoulin withdrew because of injury.
On a day of driving rain throughout, Bora-Hansgrohe's Ackermann negotiated surface water in Terracina before timing his sprint to perfection to beat Fernando Gaviria by half a wheel.
Primoz Roglic retains the overall lead, 35 seconds ahead of Briton Simon Yates.
Dumoulin, 28, pulled out shortly after Wednesday's start with a knee injury.
The Dutch rider, winner in 2017 and second last year behind Britain's Chris Froome, sustained the injury in a heavy fall on Tuesday's fourth stage, losing over four minutes.
Dumoulin had been cleared to race by his medical team and the 2017 champion said before the stage: "I want to at least try."
But Team Sunweb later tweeted: "Dumoulin's injuries have proved too painful."
Dumoulin, bleeding heavily from his left knee, was injured in a crash about 6km from the end of stage four
Ackermann, 25, is competing in his first Giro, and has now claimed five wins in total this season.
Belgian Louis Vervaeke had led a long breakaway after the start in Frascati, to the southeast of Rome, but was caught 23km from the line.
Such was the severity of the conditions, the stage was neutralised with nine kilometres remaining, freeing the sprinters to race for the stage win and meaning the main contenders for overall victory could stay safely away from the front of the peloton.
"All the stage was scary, all the descents, you cannot see that much in the peloton because of all the water," said Ackermann, wearing the cyclamen jersey for the leader of the sprinter's classification.
"It just was lucky that nobody crashed."
Stage five results
1. Pascal Ackermann (Ger/Bora-Hansgrohe) 3hrs 27mins 05secs
2. Fernando Gaviria (Col/UAE Team Emirates) Same time
3. Arnaud Demare (Fr/Groupama-FDJ)
4. Caleb Ewan (Aus/Lotto-Soudal)
5. Matteo Moschetti (It/Trek-Segafredo)
6. Ryan Gibbons (RSA/Team Dimension Data)
7. Paolo Simion (It/Bardiani-CSF)
8. Jenthe Biermans (Bel/Team Katusha-Alpecin)
9. Giovanni Lonardi (It/Nippo-Vini Fantini)
10. Manuel Belletti (It/Androni Giocattoli-Sidermec)
General classification after stage five
1. Primoz Roglic (Slo/Team Jumbo-Visma) 16hrs 19mins 20secs
2. Simon Yates (GB/Mitchelton-Scott) +35secs
3. Vincenzo Nibali (It/Bahrain - Merida) +39secs
4. Miguel Angel Lopez (Col/Astana Pro Team) +44secs
5. Diego Ulissi (It/UAE Team Emirates) Same time
6. Rafal Majka (Pol/Bora-Hansgrohe) +49secs
7. Bauke Mollema (Ned/Trek-Segafredo) +55secs
8. Damiano Caruso (It/Bahrain-Merida) +56secs
9. Bob Jungels (Lux/Deceuninck-Quick-Step) +1min 02secs
10. Davide Formolo (It/Bora-Hansgrohe) +1min 06secs