Canadian Milos Raonic has advanced to the third round of the Shanghai Masters with a win over Fernando Verdasco of Spain.

The 10th seed from Thornhill, Ont., edged the Spaniard 7-6 (1), 3-6, 6-3 on Wednesday in China.

Raonic is making a late-season run at qualifying for the ATP Finals, as well, reaching back-to-back finals in Bangkok and Tokyo the last two weeks. He won the title in Thailand but lost to Juan Martin del Potro in Japan.

He's 10th in the standings for the ATP Finals, trailing Richard Gasquet of France by less than 300 points. Raonic will play No. 8 Stanislas Wawrinka in the next round after the Swiss defeated South African Kevin Anderson 6-4, 3-6, 7-6 (5).

Gasquet also won Wednesday, defeating Vasek Pospisil of Vernon, B.C., 7-5, 7-6 (4).

Djokovic limps to victory

Meanwhile, Novak Djokovic survived a scare when he landed awkwardly on his right foot but recovered for a 6-2, 6-0 victory over Spain's Marcel Granollers.

Roger Federer had fewer problems in his second-round match,rebounding from an early break to defeat Andreas Seppi of Italy 6-4, 6-3.

Djokovic hit a running backhand in the first game of the second set and then leaped in the air, wincing in pain. He called for a medical timeout after the game to have his foot wrapped and appeared slightly tentative after returning to the court, not bothering to chase after a couple of shots.

'I was running and I made a quick movement that caused a sharp pain. It's all good now.'- Serbian tennis star Novak Djokovik

The Serb dominated the rest of the match, however, closing it out in 70 minutes to set up a third-round match with Italian Fabio Fognini, who advanced when Spaniard Tommy Robredo retired with a wrist injury while trailing 7-6 (3), 2-1.

Djokovic said the problem wasn't serious, without elaborating about where specifically he felt the pain.

"It was just an awkward movement," he said. "I was running and I made a quick movement that caused a sharp pain. It's all good now."

Federer, the fifth seed, had more unforced errors (29) than winners (19) in his first match since a fourth-round loss at the U.S. Open, but he made quick work of the 22nd-ranked Seppi.

He next plays Frenchman Gael Monfils, with a possible quarter-final with Djokovic looming.

Ailing Berdych prevails

Fourth-seeded Tomas Berdych rebounded from a back injury sustained in the semifinals of the China Open last week to defeat Feliciano Lopez 7-6 (5), 6-2. He said after his last match he could barely stand or walk when he retired against Rafael Nadal.

"I wouldn't say [my back is] 100 per cent, but I decided I was competitive enough to go on court and try to play," he said. "Looks like it was a smart decision."

Juan Martin del Potro battled through pain, as well, though his was from illness, not injury. He overcame a fever and 50 winners from big-hitting German Philipp Kohlschreiber to advance 3-6, 6-3, 7-6 (4).

After the match, del Potro said he started feeling sick on Tuesday night and relied on his serve to win the match since running was difficult.

The Argentine withdrew from the doubles to rest for his next match against 11th-seeded Tommy Haas, a 6-4, 6-4 winner over German compatriot Daniel Brands.

"Maybe tomorrow I will be feeling better. I hope so, because my match is going to be harder than today," he said.

Both del Potro and Berdych have a lot to play for this week -- they're trying to wrap up their spots in the elite ATP Finals in London, a task made slightly easier by the withdrawal on Wednesday of Andy Murray, who is recovering from back surgery.

Del Potro and Berdych would make the eight-man field by making the final in Shanghai.

Federer needs to do a bit more work, he's in seventh place in the standings, with a number of players within striking distance.

In other matches, seventh-seeded Jo-Wilfried Tsonga advanced with a 6-3, 6-2 win over Spain's Pablo Andujar, while American John Isner was ousted by Argentine Carlos Berlocq 6-4, 7-6 (4).

Nadal, the new No. 1, played late Wednesday.