Irish rider Sam Bennett hit the deck in a dramatic pile-up in the closing stages of the Tour of Slovenia, that also took down Mark Cavendish.

After winning the opening stage on Thursday, Bennett came crashing down to earth.

Dimension Data's Cavendish, attempting to prove his fitness ahead of the Tour de France after being sidelined for nearly three months, got caught up in the crash but his lead-out man Mark Renshaw avoided it to finish third as Orica-Scott's Luka Mezgec took victory.

Mezgec leads the race from Bennett by four seconds.

Renshaw, himself having endured an injury-hit year, told his team's website: "Once we entered the finish circuit, it got really chaotic with riders crashing in almost every corner due to the slippery roads.

"Our original plan was to sprint for Cavendish, but with about one kilometre to go, (team-mate Bernhard) Eisel told me on the radio to try and go for it myself instead. Unfortunately, when Mezgec jumped with 500 metres to go, I just couldn't get in the wheel of him."

Cavendish is racing in his first event since March after being diagnosed with glandular fever, caused by the Epstein-Barr virus.

The 32-year-old has two more stages to help build his fitness, while he is scheduled to race in the British Championships on the Isle of Man on June 25.

The Tour de France starts in Dusseldorf on July 1 and concludes in Paris on July 23.