Mountain section is perfect for Lopez
Lopez broke clear going into the final three kilometres of a gruelling day's riding which featured six categorised climbs, and enjoyed a comfortable margin of victory ahead of Roman Kreuziger and Giampaolo Caruso.
Jean-Christophe Peraud crossed the line 54 seconds after the leaders, falling just short of taking the leader's jersey.
Advertisement
Hide AdAdvertisement
Hide AdPeraud had been part of an early three-man breakaway in the 188km stage while Lopez hung back.
But he and others soon joined the lead group, which swelled to 15, and Peraud was looking good to take the overall lead as they jumped more than nine minutes ahead, erasing his 6:59 deficit to Igor Anton who was back in the peloton.
However, the peloton would eventually rein them back in to the extent that Peraud remains 52 seconds adrift in fifth place.
Lopez made his first move with 12km to go, but David Moncoutie stuck with him as he sought a second stage win.
Advertisement
Hide AdAdvertisement
Hide AdKreuziger and Caruso soon caught the leading pair, but when Lopez went again late on, they and Moncoutie could not respond.
Joaquin Rodriguez has caught up to Anton in the overall standings, and sits second on an identical time.
Mark Cavendish, who began the stage as the points leader, was not ranked in the top 60.
Team Sky withdrew from the Vuelta a Espana following the death of soigneur Txema Gonzalez.
Advertisement
Hide AdAdvertisement
Hide AdThe 43-year-old, a massage therapist with the British team, died in a Seville hospital on Friday as a result of a bacterial infection which entered the bloodstream and caused septic shock.
Team Sky opted not to take to the start line for Saturday's eighth stage of the year's third and final grand tourr.
Team principal Dave Brailsford said: "Txema's death is devastating to everyone in Team Sky. We've lost a good friend, a much respected and valued colleague.This is the only decision we could take."