Madrid, Madrid, Spain, 7 May 2015 | AAP

Rising Australian star Nick Kyrgios has produced a stunning upset to knock his boyhood idol, world No.2 Roger Federer, out of the Madrid Open.

In a win the 20-year-old said surpassed that of his Wimbledon victory over Rafael Nadal last year, world No.35 Kyrgios triumphed 6-7(2) 7-6(5) 7-6(12) over the top seed on Wednesday night (Thursday morning AEST).

“I think this is definitely the greatest win over my career so far,” Kyrgios, who saved three match points, said.

“It doesn’t really feel real at the moment. I didn’t really feel as if I was playing out there – it almost felt like I was watching.

“It was similar to that match at Wimbledon when I played Rafa. It’s a strange feeling. It hasn’t happened many times in my career … it’s happened twice now. It’s pretty exciting.”

After showing his frustration in losing the first set, Kyrgios calmed himself and rallied from a break down in the second set to force another tiebreak – and this time it was Federer who began to feel the heat.

Kyrgios reeled off a string of impressive winners and powerful serves to race to a 5-0 lead in the tiebreak, and went on to level the match.

When asked if he had been intimidated coming up against his idol for the first time, Kyrgios replied: “I know he’s the greatest.

“I knew before the match I had to play one of the greatest matches I’ve ever played. (But) I wasn’t intimidated at all – I have a lot of respect for him.”

Showing the same confidence and audacity which helped him prevail over Nadal last year, Kyrgios produced some unbelievable tennis in the third-set tiebreak, saving three match points before raising his arms in triumph on his sixth match point, when Federer sent a forehand cross-court wide.

“He plays the big points well and he likes the big stage,” said Federer.

“He has nothing to lose and if he can string a few good shots together that will keep him in a match.”

There were no surprises, he said: “I expected it to be difficult. I know Nick can play.”

Kyrgios will next face 16th seed John Isner for a shot at the quarterfinals.