World number one Rafael Nadal battled back from a set down to overcome 12th seed Milos Raonic and reach the semi-finals of the Sony Open.

Nadal was given a stern test by his big-hitting Canadian opponent, but the 13-time major winner came through and remains on course for a maiden title in Miami.

The 27-year-old Spaniard was caught cold in the first set but stormed back to take the match to a decider, before eventually triumphing 4-6 6-2 6-4 in two hours and 35 minutes.

Nadal saved a break point in his opening game before starting to impose himself on Raonic, who relied on his powerful serve to dig himself out of trouble on more than one occasion.

The set went with serve until the 10th game, when Raonic capitalised.

At 5-4 ahead, the 23-year-old went on the offence with some stunning groundstrokes and Nadal wilted under the pressure, double faulting at the crucial moment to lose the set.

The left-hander came roaring back, however, and opened up a 4-0 lead before comfortably closing out the second set.

Inspired, Nadal, a three-time runner-up in Miami, showed glimpses of his best form and Raonic had no answer to several fine forehand passes.

Raonic saved a break point at the beginning of the third set, but Nadal clinched the all-important break in the seventh game before going on to seal his place in the last four.

World number two Novak Djokovic is through to the final after his semi-final opponent Kei Nishikori withdrew due to injury.

The 24-year-old Japanese player needed three sets to defeat both Roger Federer and David Ferrer on consecutive days to progress to the final four but was unable to recover from a groin problem in order to face Djokovic.

It means the Serb will now face either Nadal or Tomas Berdych in Sunday's final, with the duo set to battle it out later on Friday evening.

Berdych overcame Alexandr Dolgopolov 6-4 7-6 (7/3).

Dolgopolov, seeded 22nd here, had ended the challenge of Australian Open champion Stanislas Wawrinka in the last round, but the Ukrainian could not claim another surprise win.

Berdych will move back into the world's top five as a result of his victory and will be looking to end a 16-match losing streak when he faces Nadal.

In the women's action, Serena Williams rallied to beat Maria Sharapova for a 15th straight time and advance to the final.

Williams was defending an enviable run against the Russian but found herself trailing 4-1 in the first set before winning five games in a row to take the first set 6-4.

Williams then pulled away from a 3-3 tie in the second set to win 6-3 and go through.

Williams will face second seed Li Na in the final after the Chinese player saw off Dominika Cibulkova in three sets.

Li beat the Slovakian in the Australian Open final in January and although Cibulkova gave a better account of herself in Miami, she still came out on the losing side as her 32-year-old opponent triumphed 7-5 2-6 6-3.