BEIJING -- Rafael Nadal stayed on course to wrest the top ranking from Novak Djokovic by rallying for a 2-6, 6-4, 6-1 win over Fabio Fognini of Italy in the China Open quarterfinals on Friday.

Nadal, who needs to reach the final to have a chance of regaining No. 1 for the first time in two years, was down a set and a break but changed the tempo with a timely service break.

Djokovic played Sam Querrey in a late match.

Also, top-ranked Serena Williams brushed aside former No. 1 Caroline Wozniacki 6-1, 6-4 to raise her record to 6-1 against the Dane.

Nadal seemed to struggle at times with a niggling left knee injury but wore down Fognini after that hard-fought service break in the seventh game of the second set.

"I was able to fight, to change a little bit the dynamic of the match," Nadal said. "The players who are in the top position of the rankings, it's because they are able to win when things are not going well. One of the most important things in tennis (is to) win when you don't play well."

Fognini started fluently as he broke and led 3-0. He was soon leading 5-1 but failed to serve out and had to break Nadal again with a superb cross-court return to clinch the set.

Fognini again ran up a 3-0 lead in the second and was serving with a lead of 4-2 before Nadal seized control.

It was the third straight victory over Fognini for Nadal, who next plays fourth-seeded Tomas Berdych of the Czech Republic.

Berdych scored a 7-5, 6-2 win over John Isner to improve his record to 3-2 against the American.

In other women's matches, former Wimbledon champion Petra Kvitova beat local favourite Li Na 4-6, 6-2, 6-4 to set up a semifinal with Jelena Jankovic. Jankovic also came from a set down to beat Lucie Safarova of the Czech Republic 6-7 (3), 6-4, 6-4.