Shanghai - Roger Federer has saved five match points and rallied from a 5-2 deficit in the third-set tiebreaker before finally beating Leonardo Mayer 7-5, 3-6, 7-6 (7) in a thrilling second-round match at the Shanghai Masters on Wednesday.
Rafael Nadal, meanwhile, lost to fellow Spaniard Feliciano Lopez 6-3, 7-6 (6) only days after appendicitis left him bedridden and uncertain if he'd be able to compete.
Federer hadn't played since helping Switzerland beat Italy to make the Davis Cup finals a month ago, and the inactivity showed. He made an uncharacteristic 57 unforced errors — including some bad mishits — and only won about half of his points at the net.
The Swiss star got a little lucky, though. On Mayer's first match point at 5-4 in the third, the Argentine aimed a backhand passing shot down the line but the ball clipped the tape and fell back on his side of the net.
Federer finally put it away on his first match point with a backhand lob that just caught the line.
Nadal was in so much pain from appendicitis earlier this week, he couldn't sleep, eat or even get out of bed for several days.
After an aggressive course of antibiotics to control the inflammation, he felt healthy enough to play his opening match against Lopez. However, his shots lacked depth and power, and his serve didn't have its usual punch.
Nadal said he felt a little dizzy from the antibiotics, but otherwise wasn't in a great deal of pain.
"Even today the doctors told me that I was very, very lucky that I did not have to go for surgery straight, can (treat) with antibiotics," he said. "Pain I think is under control. That's important. I think I was lucky for that."
The 14-time major winner had just returned to the tour after two months on the sidelines with a wrist injury. Now he faces likely surgery to have his appendix removed, which could keep him out of the ATP Tour Finals in London next month.
"My answer today honestly is I'm going to do it after the World Tour Finals. You never know. Depends how the things improve," he said. "When you are on the bed for three days, the only thing you want to do is feel better, feel healthy again, and that's it."
Andy Murray and Novak Djokovic also moved into the third round with wins.
Murray has been on a roll over the last three weeks in China, winning nine of his last 10 matches as he tries to qualify for the ATP Finals. He defeated Jerzy Janowicz of Poland 7-5, 6-2.
He next faces David Ferrer, another player fighting for a spot in the elite eight-man field. Ferrer rallied to beat Martin Klizan 4-6, 7-6 (4), 6-4.
"I haven't been in this position for a while, so in some ways it's kind of new," Murray said of the fight to qualify for London. "But I'm enjoying it so far. Just giving me a little bit of extra focus and direction for the last few tournaments."
With Chinese basketball star Yao Ming in the stands, Djokovic extended his unbeaten streak in China to 26 straight matches with a 6-3, 6-4 win over Dominic Thiem of Austria, at 21, the youngest player in the top 50.
Djokovic had never played Thiem before and he was impressed by the Austrian's power game.
"I had to be on alert from the start because he was serving already 215 km/h in the first service games," he said.
"He was going for it. I don't blame him. He's a young player, playing on centre court, it's his opportunity to shine."
Kei Nishikori and Stan Wawrinka were among a number of seeds to be knocked out.
The fourth-seeded Wawrinka lost early for the second straight week, squandering a 3-0 lead in the final set before falling to Gilles Simon 5-7, 7-5, 6-4. He lost to 103rd-ranked Tatsuma Ito in the first round of the Japan Open last week.
Wawrinka said he's struggled to maintain his focus since his breakthrough win at the Australian Open, causing the early losses to pile up.
"It's been an amazing year, but really tough, also," he said.
"It's not easy to stay at the top. You really have to find your way."
For Nishikori, a dominant stretch of tennis finally caught up with him. Coming off back-to-back titles in Kuala Lumpur and Tokyo, the Japanese star was bothered by pain in his hip and back in his match against big-serving American Jack Sock, losing 7-6 (5), 6-4.
Other winners include Tomas Berdych, Julien Benneteau and John Isner. Milos Raonic, the eighth seed, retired from his match against Juan Monaco with an illness while trailing 5-2.
Shanghai Masters results on Wednesday:
Novak Djokovic (SRB x1) bt Dominic Thiem (AUT) 6-3, 6-4
Andy Murray (GBR x11) bt Jerzy Janowicz (POL) 7-5, 6-2
David Ferrer (ESP x5) bt Martin Klizan (SVK) 4-6, 7-6 (7/4), 6-4
Roberto Bautista Agut (ESP x14) bt Vasek Pospisil (CAN) 7-6 (7/1), 3-6, 6-4
Julien Benneteau (FRA) bt Grigor Dimitrov (BUL x10) 7-5, 6-3
Jack Sock (USA) bt Kei Nishikori (JPN x7) 7-6 (7/5), 6-4
Tomas Berdych (CZE x6) bt Richard Gasquet (FRA) 6-3, 6-1
Malek Jaziri (TUN) bt Wang Chuhan (CHN) 6-0, 6-4
Gilles Simon (FRA) bt Stan Wawrinka (SUI x4) 5-7, 7-5, 6-4
Juan Monaco (ARG) bt Milos Raonic (CAN x8) 5-2 (Monaco won after retirement from Raonic)
Mikhail Youzhny (RUS) bt Ivan Dodig (CRO) 7-6 (9/7), 6-7 (4/7), 6-3
John Isner (USA x13) bt Steve Johnson (USA) 7-6 (8/6), 7-6 (9/7)
Feliciano Lopez (ESP) bt Rafael Nadal (ESP x2) 6-3, 7-6 (8/6)
Roger Federer (SUI x3) bt Leonardo Mayer (ARG) 7-5, 3-6, 7-6 (9/7)