MONACO -- Canadian Milos Raonic is out at the Monte Carlo Masters.

The hard-serving Thornhill, Ont., product was limited to just six aces in a 7-6 (5), 6-2 quarter-final loss to third-seeded Stanislas Wawrinka on Friday.

Raonic, seeded eighth, was playing his first clay quarter-final at the Masters 1000 level but struggled with consistency against his Swiss opponent, the reigning Australian Open winner.

Raonic, 23, is currently ranked No. 10 on the ATP but has lost all three head-to-head matches against Wawrinka. The previous two were hardcourt contests in 2012 and 2013.

Raonic played well in an opening set that lasted nearly an hour before getting into trouble in the tiebreaker. He held leads of 3-0 and 5-3 but mental lapses allowed Wawrinka to rally for the victory.

Raonic stormed out to a 40-0 lead to start the second set but again Wawrinka rallied to earn the break and take the early lead.

"Stan found a rhythm and played more free," said Raonic. "On the key points, he was really going for his shots. He overtook me and started dictating.

"But I've done something I've never done before (reach quarter-finals on clay at Masters level), so it's still very positive for me."

Raonic was broken in the seventh game to trail 5-2 before Wawrinka cemented the win a game later.

"I was really focused on my serve to be really aggressive from the first shot, to make him move, to make him work every ball," Wawrinka said. "I just feel strong from the baseline. I feel good physically.

"I know that on clay courts, if I play my best tennis, I can beat those guys."

Raonic will try to regroup as the French Open draws closer but found solace with his accomplishment in this clay event.

"I have to be happy with things if I look at the big picture," he said. "Of course I wish I would have done better, but after one week on clay I'm playing well.

"I had expected to work through the weeks up to Paris, getting better as I go along. That's still the goal. I need to get better on the clay, spend more time on it and do all the clay-specific fitness. This week does give me confidence though."

In doubles action, Toronto's Daniel Nestor and Serbian Nenad Zimonjic, who won this event in '09 and '10, face Monaco's Romain Arneodo and Benjamin Balleret in quarter-final action.

In other singles play, Rafael Nadal lost his quarter-final match to Spanish compatriot David Ferrer 7-6 (1), 6-4. It's Nadal's earliest exit at the Monte Carlo Masters in 11 years.

While he beat Nadal just last year, Ferrer hadn't defeated Nadal on clay since 2004.

A day after becoming the 11th man in the Open era to reach 300 wins on clay, Nadal committed 44 unforced errors and was broken four times. Ferrer lost his own serve three times in the match that lasted over two hours.

Nadal won eight consecutive Monte Carlo titles from 2005-'12 before he lost last year's final to Novak Djokovic.

Ferrer will face Wawrinka in semifinal action.

"I know I am supposed to be among the favourites, but every time I play a match I am in the state of mind of a challenger who is trying to win an additional match," said Wawrinka.

Swiss star Roger Federer advanced with a 2-6, 7-6 (6), 6-1 win against No. 9 Jo-Wilfried Tsonga of France. Federer was two points from defeat at 0-30 serving at 6-5 down in the second set.

Federer, who improved to 11-4 against Tsonga, wasted 15 straight break points and three set points in the second set But at 6-6 in the tiebreaker, Tsonga hit a wild forehand into the net and Federer tied the match with a volley winner.

After finally breaking Tsonga at the 16th try, Federer clenched his fist in relief. He broke him again with a forehand winner down the line and held for 5-0.

"It was just many things went wrong at the wrong time for me: Jo playing well, me playing wrong at certain times, wrong shot selections," Federer said. "I'm happy I found the way to tough it out."

Tsonga said the changing conditions in the late afternoon as the match went into a third set suited Federer's style of play more.

"I don't think it was that much of a change. I don't think there was any wind change or any crazy, like, quickness change," Federer said. "We played in those conditions a million of times."

Djokovic set up a 34th career meeting against Federer, a 17-time Grand Slam champion, by downing unseeded Guillermo Garcia-Lopez of Spain 4-6, 6-3, 6-1.

"I started very poorly. Garcia-Lopez played well and I had to work for this win," Djokovic said. "I finally started to play as I wanted in the second set."

Federer leads Djokovic 17-16 in head-to-head matches and they are 1-1 this year. Federer won in the Dubai Championship semifinals while Djokovic emerged victorious in their showdown in the final at Indian Wells.

The Serb was close to losing against Garcia-Lopez, saving a break point in the fifth game of the second set and two more when trailing 15-40 in his next service game.

Djokovic then made a crucial break to take a 5-3 lead, served out the set, and then broke Garcia-Lopez twice at the start of the third.

- With files from The Associated Press.