World number six Milos Raonic recorded his first ever win over Rafael Nadal in the BNP Paribas Open quarter-final, following a three-hour marathon.

The 24-year-old overcame his Spanish opponent 4-6 7-6 7-5 while firing 18 aces and hitting 48 winners. Despite Nadal’s 25 winners and 22 unforced errors, the Canadian has now set up a tie with Roger Federer, who beat world number nine Tomas Berdych 6-4 6-0.

"It's really great what I was able to do today and I'm very happy with it, but I don't let myself get caught up because this isn't where it ends," Raonic said after the impressive victory. "There is a lot more that I want to achieve this week."

Nadal held three match points during the second-set tiebreaker, but two errors saw Raonic smash a winner after also having plenty of chances in the tiebreaker.

However, the key moment of the contest lied in Raonic earning the only break of the set, after hitting a shot on the baseline that Nadal failed to return successfully. Dropping just one point on his serve in the final game, Raonic ensured he remained consistent to see off the world number three.

Despite losing to a lower-ranked opponent, Nadal said after the game he had gained some much-needed confidence while improving his attitude from recent times.

He said: "It's true that I didn't compete at that level of intensity mentally in tennis for a long time. I was able to be there very focused, playing with positive energy for three hours, so that's great news for me, because that's the way I competed during all of my career."

Raonic’s record for the year now stands at 15 wins and 1 defeat, but Federer could prove a task too much with a wealth of experience and success. His only current loss of the year comes against Andreas Seppi in the third round of the Australian open.

Elsewhere, Novak Djokovic will take on fourth-seeded Scot Andy Murray in the other semi-final on Saturday, creating a possible one-two final.

Milos Raonic is now the lowest-ranked player left in the men’s single tournament.