Giacomo Nizzolo won his first Giro d'Iitalia stage, while Vincenzo Nibali made it safely to Turin to secure his second triumph in the event.
Vincenzo Nibali confirmed his second Giro d'Italia title by cruising home in the final leg, which was won by first-time stage winner Giacomo Nizzolo.
Nibali put himself in a dominant position in Saturday's stage, overhauling the previous leader, Orica GreenEdge rider Esteban Chaves, with a superb comeback in the mountains.
That set up a 52-second lead going into the final day.
The Italian Astana rider, the 2013 Giro champion, only needed to stay with the peloton throughout the 163 kilometre closing stage from Cuneo, crossing the line linked with his team-mates in front of large crowds in Turin to seal his fourth Grand Tour victory.
Heavy rain made conditions tricky, with Jasha Sutterlin (Movistar) and Johann van Zyl (Dimension Data) among the riders involved in a nasty collision and unable to complete the stage, Sonny Colbrelli (Bardiani CSF) later also crashing.
Chaves finished the Giro in second place, with the top three completed by Movistar's Alejandro Valverde.
Newly crowned champion Nibali described the difficulty of his success.
"It was very hard, the time trial was terrible," the 31-year-old said. "But I was always there, in the high rankings.
"Today is a great day, there is nothing better than celebrating today with my family."