Andy Murray beats Janko Tipsarevic to book Nadal semi-final

Andy Murray in action against Janko Tipsarevic

Andy Murray overcame a stomach upset to secure his place in the last four of the Miami Masters.

Murray secured a 4-6 6-3 6-4 victory over Serbia's Janko Tipsarevic but it was far from easy for the Scot.

The British number one lost the first set, with several unforced errors proving costly after he had led 4-2.

Murray will now meet Rafael Nadal in the semi-final on Friday, after the world number two beat France's Jo-Wilfried Tsonga 6-2 5-7 6-4.

Murray received treatment for a stomach complaint after the first set, but rallied to claim victory despite a far from convincing display.

Ninth-seed Tipsarevic put up a good fight as he looked to take advantage of Murray's discomfort.

But in the end, the 2009 champion's fighting instinct saw him battle back into the match and secure the win after two hours and 39 minutes.

After being broken in his opening service game, Murray then raced into a 4-2 lead in the opening set.

But Tipsarevic won four successive games to snatch the set, before claiming an early break in the second.

Murray called for the doctor complaining of indigestion.

He returned to court and quickly found himself 2-0 down in the second set before breaking back.

Murray slowly began to settle, and his movement around the court improved as he grabbed another break before serving out the second set to force a decider.

Murray made the breakthrough in the third, winning a crucial third game in which Tipsarevic had his chances, before consolidating his position with a love service game.

While Murray never looked completely comfortable, he held his nerve to secure a gutsy victory.

Murray felt that he did not use the conditions well in the first set, but was pleased by the way he fought back in the second and third.

"It was a slow court and conditions were windy, so you could get broken at any point," he said.

"You need to be smart and intelligent on the court, and use the conditions to your advantage. In the first set I wasn't really doing that.

"But when I went behind, I started to think my way through the shots a little more. My shot selection improved, and I was able to dictate a lot of the points."

Murray admits he was affected by the stomach complaint, which he attributed to drinking too much water in the hours before the match.

"I had it once before in Bangkok a few months ago," he said.

"That was there pretty much the whole week, but hopefully this time I will try and sort it out, and not drink too much before the next match."

In the other quarter-final, Nadal took almost three hours to beat Tsonga.

The Spaniard served for the match at 5-4 in the second set but Tsonga won three straight games to force a final set.

However, Nadal broke the Frenchman in the ninth game of the third to lead 5-4, and survived two break points in the final game.