Nick Kyrgios was public enemy No. 1 during his epic Miami Open showdown with Roger Federer - and Mirka Federer was caught joining in on the cacophony of booing directed at the Australian.

In a three-hour epic that took three tiebreakers to separate the two in-form stars, Federer came back from a mini-break down in a third set tiebreak to rattle off the final three points off the match and secure a famous 7-6 (11-9) 6-7 (11-9) 7-6 (7-5) victory.

Kyrgios and Federer put on an exhibition of freaky tennis in their semi-final clash, bringing the Miami crowd to fever pitch as the match strayed on a knife's edge throughout a tense second set.

Kyrgios appeared to lose the crowd when he was trying to serve out the first set and nonchalantly threw his racquet into the ground following an unforced error.

Advertisement

Kyrgios' racquet hurl was described as "innocuous" by the ESPN broadcast commentary team, while the crowds' reaction to his tanty was labelled "vicious".

Kyrgios was not able to recover and surrendered the first set in a marathon tiebreak where he finally succumbed to the pressure 11-9.

Kyrgios was booed by the crowd as he went to rest in his seat during the break between sets.

From then on, he was hunted by the pumped-up crowd.

The chair umpire at one point late in the first set had to remind the crowd to "please show good sportsmanship to both players" after a Kyrgios double-fault attracted huge applause from the heavily-Federer-favouring Miami locals.

Immediately after the warning, a spectator again yelled out while Kyrgios was preparing to serve, forcing the Australian to blow up at the offender, telling the crowd to "shut up".

The pair continued to deliver an elite level of tennis, regularly bringing the crowd to their feet, but Kyrgios was forced to fight jeers all the way through the tense second set.

When the 21-year-old forced a delay in the game by walking over to his seat to change racquets, the crowd again let him have it with a volley of heckling with the match on serve at 2-1 in the second set.

While the crowd could be heard going after Kyrgios, broadcast cameras filmed Ferderer's wife Mirka joining in on the fun in a hugely controversial moment of the match.

Kyrgios and Federer continued to hold serve throughout the second set, forcing the pair into another tiebreaker.

Federer grabbed an early mini-break and had a chance to serve out the set with two serves at 5-4 before Kyrgios hit a booming down-the-line winner.

Kyrgios also had a set-point at 7-6 in the tiebreak but could only watch as Federer produced a first-serve one-two punch with an easy mind-court put-away.

Kyrgios finally seized his moment to go 11-9 up after another marathon breaker to level the match at a set all.

The two players continued to reach deep into their bag of tricks in the decider, which headed into a third tiebreak.

The enthralling contest reached a new level of drama when Federer, in the middle of the rally, pulled up and challenged a deep approach shot from Kyrgios that was judged in by the linesman at 2-3 down in the tiebreak.

The Hawkeye replays showed Kyrgios' approach sailed just long, levelling the breaker at 3-3 at the change of ends.

Kyrgios grabbed a mini-break at 5-4 and had two serves to take out the contest.

On the first point Kyrgios became agitated when a fan yelled out just as he was about to hit a deep forehand.

The Canberra product appeared to lose his cool after watching his shot sail wide and long.

In a fit of rage he turned his back to Federer and screamed abuse at spectators at the back of the court.

"Oh my god, shut up," Kyrgios reportedly yelled at fans.

"Shut the f*** up. What the f*** are you doing?"

From that moment on the match was Federer's.

He grabbed back the lead two points later and then served out the match with a first serve down the tee that Kyrgios was unable to return.

Federer's 7-5 tiebreak win sealed a famous victory.

The Aussie blew up and smashed his racquet at the moment of his defeat as the crowd exploded with cheers when he couldn't return Federer's serve.

Federer will now play old rival Rafael Nadal in the final after the Spaniard raced through a routine 6-1 7-5 victory over Fabio Fognini in the earlier semi-final.