Roger Federer celebrates his win over Australia’s Nick Kyrgios im the Miami Open semi-finals. Photo: Geoff Burke-USA Today Sports

MIAMI – Roger Federer beat Australia’s Nick Kyrgios 7-6 (11/9), 6-7 (9/11), 7-6 (7/5) in a thriller on Friday to set up a mouth-watering Miami Open final against Rafael Nadal.

Federer and Kyrgios produced an extraordinary range of shots in an enthralling, fiercely intense semi-final that kept a capacity crowd at Key Biscayne on the edge of their seats for the entire three hours and ten minutes of action.

When Federer won the third tie-break a furious Kyrgios hammered his racket into the ground three times as the frustration of a remarkable near-miss came flooding out.

The Australian’s big serve, touching 140 mph at times, delivered 14 aces, but Kyrgios also hit some spectacular winners and played his part in a series of stirring rallies.

But Federer was a match for most that came his way and was able to avenge his loss to Kyrgios from two years ago in Madrid also in a match which was decided by three tie-breaks.

"It felt very good. You don't very often play three breakers in a match. Winning breakers is always such a thrill," said Federer who enjoyed the battling aspect of the encounter.

"I tried to really fight for it," he said. "I can't always show my fighting skills, it is great winning this way."

While Federer now has a chance of a rare Indian Wells/Miami double, Kyrgios was left to take some compensation from his performance.

"I had some ups and up and downs, bit of a roller coaster," said the 21-year-old.

"Ultimately I think I put in a good performance. I thought the crowd would've enjoyed watching it, people at home would've enjoyed watching it. But I wouldn't be surprised if they found something bad, though."

Kyrgios broke in the first set to go 4-3 up but Federer, with the loud crowd behind him, broke back to level at 5-5 when the Australian missed with an attempted big return.

The big-hitting Kyrgios was frequently booed by the crowd for racquet throwing and language – and sometimes for very little – but appeared to be enjoying the role of pantomime villain.

The first set tie-break was a gripping affair with the Australian twice having set point before it was decided when his return went wide. The boos rang out again as he hurled his racquet in frustration.

The serve dominated more in the second set and with neither player able to break another tie-break was needed. Federer had match-point at 8-7 but found the net with his return.

Kyrgios finally won the battle with an amazing cross-court return to go 10-9 up, then followed it up with a thundering ace to force a third set.

There was nothing to choose between the pair in a third set that went to yet another tie-break.

Kyrgios was furious when a fan called out during one point, and Federer enjoyed two successful challenges late on his way to a win that sent the crowd wild with delight as Kyrgios went wild with rage.