Lopez broke serve just once, but hit nine of his 14 aces in the final set to advance at the clay-court event.
Sixth-seeded Julien Benneteau of France was eliminated after slumping to a 3-6, 6-4, 6-1 loss to Grigor Dimitrov of Bulgaria.
In other three-set matches, Lukasz Kubot of Poland rallied to beat Ivan Dodig of Croatia 3-6, 6-3, 6-4, and Germany's Dustin Brown outlasted Sergiy Stakhovsky of Ukraine 3-6, 6-4, 7-6 (8).
Ernests Gulbis of Latvia beat Italian Filippo Volandri 7-6 (2), 4-6, 6-3.
Thomaz Bellucci of Brazil routed Slovenia's Blaz Kavcic 6-1, 6-1, while Jan Hajek of the Czech Republic advanced when French opponent Edouard Roger-Vasselin retired with a stomach injury while trailing 4-1.