Li Na recovered from a slow start to progress to the quarter-finals of the Mutua Madrid Open with a 2-6 6-3 6-2 win against Sloane Stephens.
The world No 2, who was battling a toe problem, produced a string of unforced errors but still managed to secure the win after a two-hour tussle.
Li was broken twice in the opening set and had to save five more break points in the second but eventually took control against her American opponent.
"After the first set I was like, 'calm down’. I said, 'OK, I cannot only think about what happened (in) the game, you have to look forward otherwise you cannot make it’," Li said.
Li's next opponent will be last year's finalist Maria Sharapova, who moved into the last eight with a 6-4 6-3 win over Australian Samantha Stosur.
The Russian's big serving was the key as she was broken just once all afternoon to seal her 13th win over Stosur in 15 meetings.
Last year's winner and top seed Serena Williams also cruised through to the last eight with a 6-2 6-3 win against Carla Suarez Navarro.
The 17-time grand slam champion recorded her 650th WTA career win and will next face Petra Kvitova, who defeated her fellow Czech Lucie Safarova 6-4 6-3.
"She made me work for every point and it wasn't an easy win. She just won (in Portigal) last week, so she is definitely not an easy player to play," Williams said.