Elia Viviani sprinted to his fourth victory of this year’s Giro d’Italia on Wednesday, and Simon Yates maintained his hold on the leader’s pink jersey after the 17th stage.

The Italian won a bunch sprint through rain at the end of the hilly, 155km ride from Riva del Garda to Iseo, holding up four fingers as he crossed the line. Sam Bennett, who was looking for his third victory, was second and Niccolo Bonifazio was third.

“Bennett could have moved level today. It was a stage that was more suited to him. He tried to put us in difficulty,” said Viviani. “It was a hard stage because no one wanted to let the breakaway go. The team did a super job. I think they were perfect.”

Danny van Poppel was the first to launch his sprint on the rain-soaked approach to the finish, but Zdenek Stybar and Fabio Sabatini gave a great leadout for Viviani, their Quick-Step Floors team-mate. “I had a few slips, and I just lost the nerve,” said a teary Bennett, his voice cracking with emotion. “I just couldn’t get out. I had the legs again and I just couldn’t get out.”

There was no change in the general classification with Yates leading defending champion Tom Dumoulin by 56 seconds. “There’s no easy day at the Giro,” Yates said. “This was another hard one and it could have some impact on the coming mountain stages. I heard about splits in the bunch but I never knew who was caught behind. I hope everyone is tired because I’m tired.”

Domenico Pozzovivo remained 3min 11sec behind Yates and 39 seconds ahead of four-time Tour de France champion Chris Froome as the races prepares to head into the Alps.

Thursday’s 18th stage is a mainly flat 196km route from Abbiategrasso to Prato Nevoso, but ends with a steep Category 1 climb the first of three summit finishes. There are four mountain passes on the route up to Bardonecchia on Friday, before Saturday’s ‘Queen stage’ up to Cervinia. The Giro finishes in Rome on Sunday.