Sam Bennett earned his second stage win of the Giro d'Italia ©Getty Images

Ireland's Sam Bennett secured his second stage win of the Giro d’Italia on the Imola race track.

The 214 kilometres stage 12 from Osimo proved a challenging one for both general classification riders and sprinters.

A split in the peloton with 30km to go saw Italy's Elia Viviani, the race's dominant sprinter so far, among the riders in the second group.

They were forced to chase the leading pack in the closing kilometres of the stage, while a climb and descent of Tre Monti forced general classification hopefuls to be wary as rain poured.

Slovenia's Matej Mohoric, the stage 10 winner, attacked late with Carlos Betancur of Colombia.

The duo appeared to have done enough to contest the stage win on the run-in to the line, but Bennett launched a long range sprint at 400 metres to go.

The Bora-Hansgrohe rider was able to catch and move past the duo to take victory in a time of 4 hours, 49min and 34sec.

He held off the challenge of Dutch rider Danny van Poppel and Italy's Niccolo Bonifazio to clinch his second stage win.

Simon Yates finished safely in the bunch to retain his race lead ©Getty Images
Simon Yates finished safely in the bunch to retain his race lead ©Getty Images

"It was a tough final for a bunch sprint, there were two guys upfront," Bennett said.

"I didn't know how much energy they had left so I went early because I didn't want to let the stage get away from me.

"I didn't know if I would hold the lead.

"It worked to my advantage, I heard that Viviani was off the back, then that he was back.

"I wasn't sure, I just had to do my sprint.

"I think it's a nicer win than the first one."

Britain's Simon Yates finished safely in the main field, despite the conditions, to retain his race lead.

The Mitchelton-Scott rider is 47 seconds clear of defending champions Tom Dumoulin of The Netherlands.

France’s Thibaut Pinot is third at 1:18 behind.

Racing will continue tomorrow with a 180km stage from Ferrara to Nervesa della Battaglia.