The Astana team leader emerged from the fog and snow to cross the line in 5hr 27min 41sec, 17sec ahead of a trio of Colombians, one of whom, Rigoberto Uran, deposed Australian Cadel Evans from second place overall.

Nibali now has a 4min 43sec lead on Uran, with former Tour de France champion Evans finishing over a minute in arrears to drop to third at 5:52 ahead of Sunday's final, flat stage into Brescia.

"Tomorrow should finish in a bunch sprint, so I'm feeling immense joy. It was an epic win in the snow," said Nibali, who now has two Grand Tour titles after his 2010 Tour of Spain win.

On a stage that was stripped of several climbs due to severe weather conditions and fears over the safety of riders on slippery descents, Nibali attacked in the final kilometers of the 7km ascent to all but secure victory ahead of Sunday's final, flat stage into Brescia.

Colombian Fabio Duarte (Team Colombia) finished second at 17sec with Uran (Sky) in third at 19 and Carlos Betancur (AG2R) finishing two seconds further adrift.

Evans, who began the day in second overall at 4:02 behind Nibali, struggled to follow when Nibali's turn of pace prompted Uran and Betancur to follow suit.

The BMC leader finished over a minute behind to slip to third overall at 5:52 but is 56secs ahead of Lampre's contender, Michele Scarponi.

Nibali's triumph would be his first on the Giro d'Italia. The Sicilian won the Tour of Spain in 2010 and finished runner-up on his home race in 2011 and third overall at last year's Tour de France.

Nibali not only won in severe conditions but had to ward off off well-wishing supporters as he pushed his way up the final ascent.

"I had to push away a few supporters, I thought they would make me crash," said Nibali. "But finishing the race with a win like this is the cherry on the cake."

A day after the 19th stage was cancelled due to snow and sub-freezing temperatures in the Dolomites, the peloton tackled a 20th stage that was re-routed and devoid of three major climbs.

With only two real climbs before the final ascent, a four-man breakaway formed early and went on to build a lead of just over eight minutes on the main bunch.

But when the peloton started to race, their advantage steadily evaporated to two-and-a-half minutes with 24 km to the finish.

Sensing the danger, Yaroslav Popovych attacked his four-man lead group but was quickly countered by Katusha's Pavel Brutt.

Brutt enjoyed a spell on his own but crested the 8km-long Tre Croci climb with a 26sec lead on Dutchman Pieter Weening with a reduced main peloton crossing over at 48sec.

Both riders were swallowed up early on the 7km ascent to Tre Cime, which featured passages at a crushing 18 percent gradient.

"I knew the final couple of kilometers were hard, but I forgot how hard," added Nibali. "After I started to see the distance markers with 1,800 meters to go, I thought they would never end."

Attacks and counterattacks came and went but it was Astana's pace-setting that allowed Nibali to ease away from his rivals inside the final 3km.

While Uran's result will allow him to finish runner-up, Betancur's commendable third place finish—after he fought to get back to the group following a mechanical problem—put him into the top five and secured the white jersey for the best young rider.

"I really wanted this jersey, it was my objective since the start," said Betancur, who had been dueling with overnight leader Rafal Majka of Poland.