Maria Sharapova was shaky from the service line but the Russian world number two dodged danger at key moments to beat seventh seed Sara Errani 7-5 7-5 and reach the semi-finals of the Sony Open in Miami on Wednesday.
Serving at 4-5 in the second set of a see-saw struggle, the third seed Sharapova saved three set points before winning the final three games to end the two hour, 29-minute battle.
"She had her chances to win that second set. Who knows what would have happened," said Sharapova, a four-time Miami finalist who has yet to win the tournament.
"I'm lucky to get to the next one and have a chance to be in the semis again ... the great thing is that I pulled through. I worked hard. I was steady, and I gave myself a chance to get here."
Errani had four service breaks against Sharapova, who committed 14 double faults. But the 25-year-old Italian was even more vulnerable to the big-hitting Sharapova, who broke serve six times.
Sharapova, bidding for a rare double following her win at Indian Wells earlier this month, will play either 2008 runner-up Jelena Jankovic of Serbia or 15th seed Roberta Vinci of Italy in the semi-finals.
On the men's side, world number five David Ferrer overcame a sloppy start to defeat Austrian Jurgen Melzer 4-6 6-3 6-0 in their quarter-final.
Third-seeded Ferrer, who has already won twice this year after notching seven tournament wins in 2012, raced through the final set losing just four points on serve and committing only four unforced errors to finish with a flourish.
The loss ended a nine-match winning streak for 42nd-ranked Melzer, who won earlier this month in Dallas.
The Spaniard will meet the winner of Wednesday's later match between Germany's 15th-seeded Tommy Haas, who knocked out world number one Novak Djokovic, and French 11th seed Gilles Simon.