David Ferrer walks to his chair during a break between games of his third-round match against Gilles Simon at the U.S. Open in New York.

NEW YORK — Gilles Simon felt cheated by the weatherman.

Instead of the cool day he was expecting, he faced the prospect of playing a top player who had dominated him in the past on one of the hottest, muggiest days of the U.S. Open so far.

In the end, the skinny Frenchman overcame both, beating fourth-seeded David Ferrer 6-3, 3-6, 6-1, 6-3 to pull off the biggest upset to hit the men’s draw yet. Ferrer was the first of the top 10 seeds to go down, and nobody was more surprised than the 26th-seeded Simon.

“I was not really prepared,” he said with a smile, “because everyone was talking about the cooler day with maybe some rain.

“It was really, really difficult to play. It was hot and it was so humid. I never sweat like this in the last 10 years.”

Simon, who was ranked as high as No. 6 in 2009 and cracked the top 20 earlier this year, came into the match with a 1-5 record against Ferrer, and most of those losses weren’t even close. Simon said that actually helped him to play more relaxed, as if he had nothing to lose.

He confounded the Spaniard by mixing up the spin, height and pace of his shots that kept Ferrer out of sync on grueling rallies that often went past 20 shots, the longest lasting 30.

Ferrer piled up an uncharacteristic 52 unforced errors, nearly twice that of Simon, who sensed the Spaniard was tiring in the 90-degree heat.

“I felt he was in trouble,” Simon said. “It’s not very often that him and me are tired like this just after two hours, but I feel we run a lot.”

Ferrer acknowledged as much after the match, saying, “It was not easy for me. I was not good with my fitness.”

It marked Ferrer’s second straight early Grand Slam exit after a second-round loss to Andrey Kuznetsov at Wimbledon. That ended Ferrer’s streak of 10 straight major quarterfinals.

Simon moves on to play 14th-seeded Marin Cilic, a 6-3, 3-6, 6-3, 6-4 winner over 18th-seeded Kevin Anderson, for a shot at the quarterfinals. That would match Simon’s deepest Grand Slam run, at the Australian Open in 2009.