German rider Tony Martin finished fifth to retain the leader's yellow jersey before Sunday's final stage to Nice.

Martin, who took the overall lead after winning Friday's time trial, is 36 seconds ahead of former leader Andreas Kloeden of Germany in the overall standings. Bradley Wiggins of Britain is third, 41 seconds back.

Under heavy rain, Di Gregorio made his move after Karsten Kroon was caught by the peloton, and then held off his rivals over the final kilometers. Saturday's stage was the longest of the race at 215 kilometers.

“The whole Astana team did a huge job and I tried my luck,” Di Gregorio said. “I took some risks, I almost fell but I had to go for it.” Di Gregorio was hired by Astana last season after the Francaise des Jeux outfit decided against renewing his contract.

“For sure, I was missing moments like this,” said the 25-year-old Di Gregorio, who was once seen as France's biggest cycling talent. “I waited so long to win a beautiful stage like this. It's great. It took a lot of work and a lot of questioning. I'm glad to offer this victory to those who kept believing in me.”

Di Gregorio almost fell three kilometers from the line after the rear wheel of his bike skidded as he approached a roundabout, but managed to keep his balance.

Di Gregorio crossed the finish line five seconds ahead of Samuel Sanchez and Rigoberto Uran. Kloeden was fourth, seven seconds back.

The stage was marred by several crashes and many riders including Peter Sagan were forced to withdraw. Heinrich Haussler also crashed but was able to reach the finish.