Soderling, a French Open finalist last year, evened his career record against Lopez at 4-4.
Next up for the Swede, the second and highest seed after Rafael Nadal's withdrawal, will be Argentine qualifier Eduardo Schwank, whom Soderling beat in the Davis Cup last month. Schwank defeated Ivan Navarro of Spain 6-3, 7-6 (7).
Tsonga, making his debut in Barcelona, also beat 15th-seeded Almagro at the Australian Open and last week in Monte Carlo.
Fifth-seeded Fernando Verdasco had to overcome a one-set deficit and win a second-set tiebreak en route to beating Jurgen Melzer of Austria 3-6, 7-6 (1), 6-3, and eighth-seeded David Ferrer, the runner-up to Nadal for the past two years, won all nine games when qualifier Simone Bolelli of Italy retired with a right wrist injury.
Verdasco and Ferrer were the only Spaniards to win Thursday from eight starters in the third round.
Among the ousted was former French Open champion Juan Carlos Ferrero, the 2001 Barcelona winner, who lost his first meeting with Thiemo de Bakker of the Netherlands 7-6 (2), 3-6, 7-6 (4). De Bakker set up a quarterfinal with Tsonga.