After Orica-Scott's Adam Yates opened up an advantage with an attack on the final climb, Lopez jumped away from the GC group with Trek-Segafredo's Alberto Contador before dropping the Spaniard and bridging to Yates alone. After closing down the Briton, Lopez pushed on solo and held off those in pursuit to take the win.
Katusha-Alpecin's Ilnur Zakarin nabbed second on the stage with a late move out of the red jersey group, with Sunweb's Wilco Kelderman taking third. Esteban Chaves (Orica-Scott) finished fourth just ahead of race leader Chris Froome (Sky). With Bahrain-Merida's Vincenzo Nibali coming in six seconds later in seventh place, Froome grew his GC advantage to back over one minute on the Italian heading into Monday's rest day.