With Sky's Giro leader out of the race, Mikel Nieve was freed up for victory on the four-climb 170km stage from Palmanova to Cividale del Friuli. While Andrey Amador (Movistar) assumed the race lead, the overall standings remain unchanged.
Giovanni Visconti (Movistar) crossed the line 43 seconds behind Nieve before Vincenzo Nibali (Astana) led home the main contenders.
Nieve soloed for 33kms across the final two climbs after attacking the large lead group that had formed earlier. Joe Dombrowski (Cannondale) joined the Sky rider but was soon dropped. Visconti leapfrogged to Dombrowski, pulling clear on the final climb.
"I'm very happy. It's been almost five years since I last won a stage at the Giro d'Italia. Today's attack was kind of planned," Nieve said.
"To go on the attack for a stage victory was the only thing we could do after Mikel Landa abandoned. I went full gas. It's great that I've made it."
After 40kms raced, a 24-rider breakaway formed at the foot of the first category one climb. It included such riders as Damiano Cunego (Nippo-Vini Fantini), Alessandro De Marchi (BMC), Stefan Denifl (IAM), Moreno Moser (Cannondale), and Diego Ulissi (Lampre-Merida).
Denifl attacked and crested the first summit alone but soon found himself at the back of the breakaway after inattention during a nature break.
The overall contenders
On the final climb, Alejandro Valverde (Movistar) Rafal Majka (Tinkoff), Vincenzo Nibali (Astana), Jakob Fuglsang (Astana), Esteban Chaves (Orica-GreenEdge), Steven Kruijswijk (LottoNL-Jumbo) and Domenico Pozzovivo (AG2R) pulled clear from the other contenders, including race leader Bob Jungels (Etixx-Quickstep).
Ilnur Zakarin (Katusha) and Andrey Amador (Movistar) rejoined the others after the final descent, but Jungels could not claw back the 50 seconds to Amador.
Amador said after the stage he will do his best to enjoy his time in pink.
"I'm delighted to have the Maglia Rosa. The truth is that Alejandro Valverde is very strong and my move to the top spot doesn't change anything. He's our captain and I'm racing for him. We have two very hard days ahead. Tomorrow it'll be one of the queen-stages. It's great to go into it with the Maglia Rosa."