Kei Nishikori Paris Masters
Kei Nishikori, with his win over David Ferrer in the quarterfinals, became the first Asian singles player to qualify for the year-end ATP World Tour FinalsReuters

Roger Federer's hopes of knocking Novak Djokovic off the top of the ATP world rankings before the end of the year took a hit when he lost to big-serving Canadian Milos Raonic in the Paris Masters quarterfinals on Friday.

The Swiss second seed was beaten 7-6 (5), 7-5 and Djokovic later saw off Britain's Andy Murray 7-5, 6-2 to advance to the semifinals of a tournament he won last year.

Federer had narrowed the points gap on Djokovic in recent weeks, but defeat in Bercy halted his charge, while Japan's Kei Nishikori and Raonic completed the lineup for the season-ending ATP World Tour Finals which will be played in London from 9-16 Nov.

All is not lost for Federer, however, as the Swiss is able to boost his points tally in the Davis Cup final against France.

"Milos played well. As I said, I always thought it was going to get solved in London," Federer, who beat Raonic in the Wimbledon semifinal this year, told a news conference.

"Whether I am number one at the end of this year or one or two weeks later next year, it doesn't really matter. Novak seems to be fit, anyway."

Seventh seed Raonic, who qualified for London after Nishikori beat Spanish fourth seed David Ferrer 3-6, 7-6 (5), 6-4 to become the first Asian singles player to qualify for the season-ending showpiece, served 21 aces to beat Federer for the first time in seven attempts.

Raonic will face Tomas Berdych in the semifinals after the Czech booked his place in London with a 6-7 (4), 6-4, 6-4 victory over South African Kevin Anderson.

Djokovic, who edged a close first set against Murray before running through the second, will take on sixth seed Nishikori.

Federer appeared relieved that he would have a little more time to prepare for the Tour Finals.

"What this does is I will have a good preparation for London," he added. "It's not that I didn't want to win here, but I knew it was going to be tough from the start. I accept that."

The 17-time Grand Slam champion never found the key on Raonic's huge serve and managed to engineer only one break point, in the 10th game of the second set when the Canadian bombed down an ace to fend off a set point.

A superb backhand pass in the next game allowed Raonic to break the Federer serve and he closed out the match in style.

"Considering all the circumstances around it, I think this was the biggest win for me," Raonic said.

Fifth-seeded Berdych, who won on his Bercy debut in 2005, became the sixth player to secure his place in London.

After losing the opening set tiebreak, he found his range on serve to level, and recovered from a break down in the third set to finally subdue Anderson and qualify for the year-ender for the fifth year in succession.