Lopez, seeded 10th, knocked off sixth-seeded Dmitry Tursunov 7-6 (10-8), 6-4. Tursunov was coming off a tournament win last week in Thailand.
For his troubles, Lopez draws world No. 8 Ferrer, who was a 6-1, 7-6 (7-0) victor over Vincent Spadea in third-round play.
Seventh-seeded Ivo Karlovic saved three match points en route to a 7-6 (8-6), 6-7 (8-10, 7-6 (10-8) win over ninth-seeded Lee Hyung-taik. Karlovic goes into Friday's quarterfinals against fourth-seeded Lleyton Hewitt, who had a much easier third-round match in a 7-5, 6-3 victory over Ivan Navarro.
The fourth quarterfinal has third-seeded Richard Gasquet playing Dudi Sela. Gasquet, who won last week in India, was still sharp in a 6-2, 6-2 triumph over Rainer Schuettler. Sela was ahead 6-2, 4-0 when Boris Pashanski retired because of illness.
The tournament finals are set for Sunday when the champion will pick up $145,000.