SHANGHAI (AP)—Rafael Nadal failed to reach a quarterfinal for the first time this year after a shock defeat by Jurgen Melzer in the third round of the Shanghai Masters on Thursday.

The No. 1-ranked Nadal had never dropped a set to the Austrian in three previous meetings but went down 6-1, 3-6, 6-3. The Spaniard had most recently beaten Melzer in the semifinals of the French Open this year on his way to the title.

Nadal won the U.S. Open in September to become the seventh man in history to win all four Grand Slam tournaments and was bidding for his eighth title of the season in Shanghai.

He won the Japan Open title on Sunday before traveling to Shanghai and said his busy schedule contributed to the loss.

“This isn’t a surprise for me. I didn’t play well, “said Nadal. “I felt slow on court and I made more mistakes than usual. In general, I am a little bit more tired than usual, physically and mentally.

“You can’t expect to win every week. All the good work is done for me for the year.”

Melzer played aggressively from the start, hitting booming forehand winners and attacking Nadal’s second serve to break the Spaniard twice and capture the opening set in 40 minutes.

“I felt he was uncomfortable after a few games,” Melzer said. “When the ball was in play, he sometimes missed and his backhand was just dying in the net. I felt if I kept playing like that and not give him too much rhythm, I’d have my chance.”

Nadal stormed back in the second set, getting his first—and only—break of the match with a running backhand down the line that the Austrian dumped into the net.

The two players held serve in the deciding set until the fifth game when Nadal badly shanked a forehand long and hit another one wide to give Melzer his third break of the match. The Spaniard saved three match points on his serve, but Melzer easily put the match away on his next serve.

Roger Federer, Novak Djokovic and Andy Murray all had easier times on Thursday.

Federer, playing his first tournament since the U.S. Open in September, was made to work hard before beating Italian Andreas Seppi 6-3, 6-4, to set up a quarterfinal against Robin Soderling.

The No. 3-ranked Federer has a 13-1 winning record against the Swede, who defeated 11th-seeded David Ferrer 7-5, 6-4.

“I’m looking forward to a tough match,” Federer said. “Even though I have a great record against him (Soderling), I have a lot of respect for him and am excited about the match. Definitely going to bring the heat on his serve and try to hit hard forehand or backhand.”

Murray beat qualifier Jeremy Chardy of France 6-3, 6-4 to reach his ninth quarterfinal this year and book his place at the World Tour Finals in London.

Murray started off slowly against the 59th-ranked Chardy, facing three break points in his opening service game. But he served two aces and flicked a volley past Chardy at the net to hold and then immediately broke his opponent at love in the next game.

“I served well under pressure,” Murray said. “That was really, really important to get a good start in the match because he’s very, very streaky. He can play some great tennis, so I needed to try to get ahead early and I managed to do that.”

The Scot has benefited from a relatively easy draw, receiving a first-round bye and beating a 465th-ranked Chinese wild card in the second round. He’ll face his first real test in the quarterfinals when he faces 12th-seeded Frenchman Jo-Wilfried Tsonga, who defeated Germany’s Florian Mayer 7-5, 6-3.

Djokovic, aiming to win back-to-back titles after capturing the China Open in Beijing last week, defeated Frenchman Richard Gasquet 6-1, 6-1.

Gasquet looked drained after winning two matches due to the rain-delayed schedule earlier in the week. He dropped serve five times and had only six winners, compared to 25 for the second-ranked Serb.

“I don’t know how (Gasquet) felt and I didn’t care,” Djokovic said. “I did really well from the start. I put pressure on him and I was aggressive. I didn’t give him a chance to come back into the match.”

Djokovic next faces Spain’s Guillermo Garcia-Lopez, who upset Wimbledon finalist and seventh-seeded Czech Tomas Berdych 7-6 (4), 6-3. Garcia-Lopez advanced Wednesday when Andy Roddick retired with a groin injury while leading 6-3, 2-3.