SHANGHAI (AP) -- Roger Federer assured himself the No. 1 ranking for the 300th week of his career by beating Davis Cup teammate Stanislas Wawrinka 4-6, 7-6 (4), 6-0 Thursday in the third round of the Shanghai Masters.
"It's obviously an amazing number and I never thought of anything like this when I was a little kid,'' Federer said. "I just thought one day my dream would come true to play on the tour. So here I am at 300 weeks, and it's probably one of my biggest accomplishments and something I'm very proud of. No doubt about it.''
The Swiss star will play 10th-seeded Marin Cilic in the quarterfinals after the Croat beat Fernando Verdasco of Spain 4-6, 6-1, 6-4. Novak Djokovic and Andy Murray also reached the quarterfinals. Djokovic defeated Feliciano Lopez of Spain 6-3, 6-3, and Murray beat Alexandr Dolgopolov of Ukraine 6-2, 6-2.
Murray will play unseeded Radek Stepanek of the Czech Republic. Stepanek upset eighth-seeded John Isner 6-4, 6-7 (5), 6-3.
Federer struggled with his backhand for much of the first two sets before recovering.
"I just keep on trying,'' he said. "I knew I had a chance going into the breaker and I was just a little lucky. But I never stopped believing. But he was the better player for two sets. It was great finding a way out.''
The second-seeded Djokovic had 12 aces and won 27 of 29 first-serve points. The third game of the second set was the only time in the match that the Serb lost two points on serve.
"I'm trying to enjoy the efficiency of my serve,'' said Djokovic, who had three aces in one game in the first set. "I'm not very well known around the tour for big serving. But so far in this tournament, and also in Beijing, it has been working very well for me. It has been giving me a lot of free points, a lot of confidence into the matches.''
Djokovic will play Tommy Haas of Germany, who defeated Djokovic's countryman, Janko Tipsarevic, 6-2, 6-1. Fourth-seeded Tomas Berdych of the Czech Republic defeated Sam Querrey of the United States 6-2, 6-7 (3), 6-4, and fifth-seeded Jo-Wilfried Tsonga beat Marcos Baghdatis of Cyprus 6-2, 7-6 (2).
Berdych will play fifth-seeded Jo-Wilfried Tsonga. The Frenchman downed Marcos Baghdatis of Cyprus 6-2, 7-6 (2).