Roger Federer at No. 1 for 300th week in career

Roger Federer celebrates match point during his semi-final match against Novak Djokovic.

Roger Federer kept his No. 1 ranking for a record 300th consecutive week with another win at the Shanghai Masters on Thursday.

The Swiss star beat Davis Cup teammate Stanislas Wawrinka 4-6, 7-6 (4), 6-0 in the third round to assure himself the top spot for another week, The Associated Press reported.

More from GlobalPost: Andy Murray beats Roger Federer for Olympic gold

"It's obviously an amazing number and I never thought of anything like this when I was a little kid," Federer told the AP. "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."

He is scheduled to play 10th-seeded Marin Cilic in the quarterfinals on Friday. He's won all three matches against Cilic thus far, according to his website.

More from GlobalPost: Reliable Roger derails Murray Mania at Wimbledon

Second seed Novak Djokovic and defending champion Andy Murray also advanced to the quarterfinals, Reuters reported.

Federer has won a record 17 Grand Slam titles, the last coming at Wimbledon this past summer, more than two years since winning his last at the 2010 Australian Open, according to ESPN.

He regained the world No. 1 ranking shortly after that for the first time in more than two years.