An out-of-sorts Roger Federer smashed his racquet in frustration during a 3-6 6-2 6-3 defeat by Serbia's Novak Djokovic in the semi-final of the Sony Ericsson Open Friday.

Djokovic, ranked third, will now play the winner of the second semi between Britain's Andy Murray and Argentine Juan Martin Del Potro in Sunday's final.

After Del Potro eliminated Rafael Nadal on Thursday, the Miami crowd backed Federer in the hope of seeing one of the world's two best players in Sunday's final.

But Federer, who made 47 unforced errors, did not look like the man who dominated the sport for so long.

After winning the first set comfortably against an error-prone Djokovic in just 25 minutes, Federer faded badly in the second.

In windy conditions, the Swiss won just 57 percent of first serve points in the second and it got worse in the third as Djokovic broke at the first attempt.

Down 30-0 in the third game of the final set, Federer played a forehand long and responded by hurling his racket to the ground, totally disfiguring it and drawing jeers from the crowd.

Four years ago at the same venue, Federer was down two sets to Nadal when he smashed his racket and then came back to win in a five-set thriller in the final.

This time, although Federer got the crowd going and won two games in a row from 4-0 down, Djokovic kept his cool to secure just his third win in 10 attempts against Federer.