World number one Amelie Mauresmo recovered from a nightmare second set to beat Serena Williams 6-4 0-6 6-2 in the fourth round of the US Open.
Mauresmo rediscovered her form in the deciding set
Mauresmo edged a tight first set, but lost her way dramatically, winning only nine points in the second.
However, Williams' lack of match fitness seemed to catch up with her in the decider, as Mauresmo engaged the American in several gruelling rallies.
The top seed broke in the sixth game and that ended Williams' challenge.
"I'm very excited," said Mauresmo, who will now meet Russia's Dinara Safina in the quarter-finals.
"I'm pretty happy with the third set but let's forget about the second. I'm glad I was able to really focus back into the match from the beginning of the third set.
"The experience I've got really helped me tonight. It's starting to show a little bit on the court."
I don't think fitness was a factor - I just don't think I played well
If Mauresmo wins the title, she will be the first woman since Williams in 2002 to win three Grand Slams in a year.
Williams went into the match with a 9-1 winning record over Mauresmo and after powering through the second set, she looked poised to improve that.
But the match turned in the sixth game when a gripping 35-stroke exchange ended with Williams putting a tired backhand into the net.
Mauresmo went on to break serve and won nine of the last 12 points to seal victory.
Williams, who had played only 12 matches all year before the US Open because of a knee injury, denied a lack of fitness was to blame for her defeat.
"I don't think it was a factor," she said.
"I think I could have come out on top had I made a few more shots and had I just been a little bit more consistent.
"I just don't think I played well tonight. I think if I would have played the way I played yesterday or my first or second-round match, the results would have been different.
"Whether that's a lack of match play, I'm not one to make excuses. I think it just boiled down to me not playing as well as I did in all my other matches.
"That's the bottom line."