SHANGHAI, Oct 11: Roger Federer survived a huge scare on Thursday to reach the Shanghai Masters quarter-finals and guarantee a 300th career week as world No 1 as Novak Djokovic and Andy Murray showed ominous form.

The Swiss 17-time Grand Slam champion came into the match against compatriot Stanislas Wawrinka with an enviable 11-1 head-to head record but struggled to impose himself and was forced to dig deep before winning 4-6, 7-6, 6-0.

In a gripping contest lasting nearly two hours, Wawrinka, who teamed up with his illustrious compatriot to win Olympics doubles gold in 2008, broke Federer in the seventh game to lead 4-3 and sealed the first set.

Out-of-sorts Federer, 31, continued to struggle in the second set as the pair swapped breaks of serve and was in desperate trouble when Wawrinka earned a break point for a 5-4 lead, which would have left him serving for the match.

But the Swiss great dodged that bullet and stayed strong in a nerve-jangling tie-break to level the match and immediately broke his 27-year-old countryman at the start of the third set as momentum shifted decisively in his favour.

A dejected Wawrinka failed to win another game as Federer wrapped up the third set 6-0.

Earlier, Serbian second seed Djokovic looking to wrestle the world No 1 ranking from Federer barely broke sweat against Spain’s Feliciano Lopez, wrapping up a straightforward 6-3, 6-3 victory in front of enthusiastic fans.

In-form Djokovic, fresh from his third China Open title in Beijing on Sunday, struck 12 aces and took advantage of some below-par serving by the left-handed Lopez, breaking him three times.

US Open champion Murray, 25, proved far too strong for Ukraine’s Alexandr Dolgopolov, serving consistently well and seizing on five out of six break points to win 6-2, 6-2 in just 57 minutes.

Fifth seed Jo-Wilfried Tsonga, currently in line to secure the last singles berth in the elite eight-man field at the ATP World Tour Finals, beat Marcos Baghdatis of Cyprus 6-2, 7-6 in a contest containing eight breaks.

Czech fourth seed Tomas Berdych, sixth in the Race to London, set up a quarter-final meeting with Tsonga after fending off a barrage of 17 aces from American Sam Querrey to win 6-2, 6-7, 6-4.

Radek Stepanek of the Czech Republic upset eighth seed John Isner of the United States in three sets while 10th seed Marin Cilic of Croatia beat Spain’s Fernando Verdasco, also in three sets.

Results (prefix number denotes seeding): Third round: Tommy Haas (Germany) bt 6-Janko Tipsarevic (Serbia) 6-2, 6-1; 1-Roger Federer (Switzerland) bt 13-Stanislas Wawrinka (Switzerland) 4-6, 7-6 (7-4), 6-0; 10-Marin Cilic (Croatia) bt Fernando Verdasco (Spain) 4-6, 6-1 6-4; Radek Stepanek (Czech Republic) bt 8-John Isner (US) 6-4, 6-7 (5-7), 6-3; 3-Andy Murray (Britain) bt Alexandr Dolgopolov (Ukraine) 6-2, 6-2; 2-Novak Djokovic (Serbia) bt Feliciano Lopez (Spain) 6-3, 6-3; 4-Tomas Berdych (Czech Republic) at Sam Querrey (US) 6-2, 6-7 (3-7), 6-4; 5-Jo-Wilfried Tsonga (France) bt Marcos Baghdatis (Cyprus) 6-2, 7-6 (7-2).

PARMENTIER SHOCKS ZHENG OSAKA (Japan): Unseeded Pauline Parmentier of France reached the quarterfinals of the Japan Open by upsetting second seed Zheng Jie of China 6-3, 6-4 on Thursday.

Parmentier won 74 percent of her first serves in the match and will next face Heather Watson after the Briton beat sixth seed Anabel Medina Garrigues of Spain 6-7, 6-2, 6-3.

Seventh seed Chanelle Scheepers of South Africa defeated Mirjana Lucic of Croatia 6-2, 6-2 and will next face Misaki Doi of Japan.

Eighth seed Laura Robson of Britain also advanced to the quarter-finals, beating Chinese qualifier Yimiao Zhou 6-4, 6-4 to set up a clash with Kai-Chen Chang of Taiwan.

Results: Second round: 8-Laura Robson (Britain) bt Zhou Yimiao (China) 6-4, 6-4; Heather Watson (Britain) bt 6-Anabel Medina Garrigues (Spain) 6-7 (4-7), 6-2, 6-3; 7-Chanelle Scheepers (South Africa) bt Mirjana Lucic (Croatia) 6-2, 6-2; Pauline Parmentier (France) bt 2-Zheng Jie (China) 6-3, 6-4.—Agencies