Top-seeded Ferrer made the last eight in Stockholm at his third attempt when he overcame Jack Sock of the United States 4-6, 6-3, 6-1, while second-seeded Raonic was hard-pressed to finish off Joachim Johansson of Sweden, who came out of retirement at 31 and qualified for his first pro main draw in 2 1/2 years. Raonic won 6-2, 7-6 (3).
No. 5 Ernests Gulbis of Latvia and No. 7 Grigor Dimitrov of Bulgaria also won, but No. 4 Kevin Anderson of South Africa and three-time finalist Jarkko Nieminen of Finland lost their second-round matches.
In the quarterfinals, Ferrer will face Fernando Verdasco in an all-Spanish match, Raonic will play French wild-card Benoit Paire, Jerzy Janowicz of Poland will face Gulbis, and Dimitrov will meet Kenny De Schepper of France.