KEY BISCAYNE, Fla. (AP) -- The long rally went corner to corner for more than two dozen strokes, lasting so long that even the inexhaustible Rafael Nadal needed a minute to catch his breath.
He stood behind the baseline, panting as he slowly toweled off before summoning one final burst of energy. One point later, Nadal had the victory and a berth in the quarterfinals at the Sony Ericsson Open.
Nadal swept five consecutive games midway through the match Tuesday and beat No. 16-seeded Kei Nishikori 6-4, 6-4.
The victory was by far Nadal's most taxing of the tournament, and he took a medical timeout late in the opening set for treatment of his troublesome left knee. Even so, he's one round closer to his first Key Biscayne title.
"I am not probably in perfect condition today with the left knee," he said. "But the important thing is to try to win as many matches as possible. For me this is an important tournament, and every victory has very, very big value for me, especially without being perfect."
Nadal lost the Key Biscayne final last year to Novak Djokovic. He was also the runner-up in 2005 and 2008.
Seeded No. 2, Nadal was joined in the final eight by No. 8 Mardy Fish, who edged No. 12 Nicolas Almagro 6-3, 6-7 (2), 6-3.
Fish was relegated to the grandstand court for the third consecutive match rather than the stadium, even though he's the top-ranked American man, but the slight didn't faze him. He hit 16 aces and won 15 points at the net.
No. 9 Janko Tipsarevic also advanced, beating 20-year-old Grigor Dimitrov 7-6 (3), 6-2.
No. 2 Maria Sharapova became the first semifinalist when she drubbed reigning French Open champion Li Na 6-3, 6-0. Sharapova had lost their previous four meetings.
Like Nadal, Sharapova seeks her first Key Biscayne title. She lost the final in 2005, 2006 and last year.
Nadal has been bothered by his knee since Indian Wells, where he lost to Roger Federer in the semifinals two weeks ago. Nine games into his match against Nishikori, Nadal called a medical timeout and had a trainer tape his leg.
That's when the momentum swung. In the next game Nadal took the opening set with a service break when Nishikori sailed an easy forehand long. The Spaniard broke again as he raced to a 3-love lead in the second set.
"At the end of the first set, I felt that I started to win my serves easier than him," Nadal said. "I had more the control of the game."
Nadal improved to 16-3 this year. He's seeking his first tournament title since the 2011 French Open.