INDIAN WELLS, Calif. -- Canadian Milos Raonic earned one of the biggest wins of his career Friday with a 4-6, 7-6(10), 7-5 defeat of Rafael Nadal to reach the semifinals of the BNP Paribas Open.

Raonic, from Thornhill, Ont., rained down 18 aces in a nearly three-hour struggle in which the sixth seed held his nerve throughout to deny Nadal a spot in Sunday's semifinals against Roger Federer.

Instead Raonic will line up against the four-time champion after beating Nadal for the first time in six meetings.

"I'm about as happy as I can be," said Raonic, who has improved his showing at this desert venue with successive appearances. "I'm delighted and very fortunate.

"But there is a day of work tomorrow and I have to prepare for that. I need to keep up the momentum."

Federer booked his place in the semis as he crushed Tomas Berdych 6-4, 6-0.

The ATP No. 2 has won eight of nine against Raonic, with the 24-year-old Canadian catching the Swiss with a win at Paris Bercy last November indoors.

Raonic lost the opening set against Nadal but turned in an heroic second to level after missing on multiple set points.

In the third, Raonic did not waver, matching Nadal toe-to-toe and breaking for 6-5.

The Spanish third seed saved a break point in that game earlier, but could not handle a Raonic return that dropped dead on the baseline.

A game later, Raonic sent over an ace for a match point and took victory as Nadal sent a return wide.

Raonic ended with 48 winners and 59 unforced errors in his controlled display of power tennis. Nadal finished with just 25 winners.

Raonic has now advanced to the quarter-finals or better at eight of his last 10 Masters 1000 events, a feat matched only by Federer.

Nadal swept up the opening set in quick fashion after 38 minutes thanks to his single break of Raonic's serve in the third game.

But life got more complicated for both players in the second as Raonic began to get stuck into his game and concentrated as much on holding his nerve as in diffusing the shotmaking genius of his opponent.

Raonic played even with the Spaniard as he saved break points to hold for 3-2 and again for 5-4. But the Canadian missed a chance to level at a set each as he missed on two set points in the tenth game.

Raonic drove an easy forehand into net on the first and could only watch as Nadal fired an ace on the second as the set went to a tiebreaker.

The tension tightened in the decider, with Nadal failing to convert on three separate match points. Meanwhile Raonic had difficulties with set-point chances before finally converting after 81 minutes when Nadal hit the net with a return.

In doubles, Vancouver's Vasek Pospisil and American partner Jack Sock, the Wimbledon champions, were playing to reach the final as they faced Poland's Marcin Matkowski and Serb Nenad Zimonjic, former part of Toronto's Daniel Nestor.