Maria Sharapova reached the quarter-finals of the US Open for the first time since winning the title six years ago, but was given a real scare by fellow Russian Nadia Petrova.
The third seed had reason to thank the New York rain after a delay early in the decider helped her recover from 2-0 down to post a 6-1 4-6 6-4 victory under the lights on Arthur Ashe Stadium.
Sharapova had looked set to win in straight sets when she recovered from 4-0 down in the second set to level, but Petrova reeled off four games in a row before the rain started to fall.
They resumed an hour and 13 minutes later with Sharapova in much more assertive form and she broke Petrova twice before serving out the win after two hours and 14 minutes.
Sharapova talked to her coach, Thomas Hogstedt, in the break and said: "He told me to get my act together.
"That was quite important. I got it back to 4-4 in the second and I had chances to break but she played a good game. At the beginning of the third I was a bit sloppy.
"He just told me to fight and that was what I did. I'm so happy to be back in the quarters, it's been so many years, and it's a great stage to be at."
Sharapova will play Marion Bartoli in the last eight after the 11th seed upset fifth seed Petra Kvitova despite winning only one game in the opening set.
Bartoli's quirky double-handed style makes her a unique opponent and the Frenchwoman turned things around emphatically to win 1-6 6-2 6-0.
Kvitova had been one of the form players of the north American hard-court season, winning titles in Montreal and New Haven.
The other quarter-final in the top half of the draw will see top seed Victoria Azarenka meet defending champion Sam Stosur.
The Australian ended the run of British teenager Laura Robson, who had beaten Kim Clijsters and Li Na to make the fourth round, with a 6-4 6-4 victory.
Stosur's heavy spin eventually proved too much for the 18-year-old, who nevertheless saved eight match points before finally succumbing.
Stosur has a reputation for being mentally flaky but held her nerve and said: "It can get a little bit frustrating if you let it get to you.
"I think the more experienced you are, you don't let those things affect you. I probably had a few flashbacks to a few matches last year when I had match points and couldn't close it out.
"It's one of those things. Sometimes it takes a few of them to get through. If you're not doing the wrong things on those points, you can't get too down on yourself."
Stosur has her work cut out to advance any further, having lost all six of her previous meetings with Azarenka, winning only 13 games in the four most recent clashes.
"I have not done well against her in the past," the seventh seed said. "I think there's a few things I've learned over those last few matches. Hopefully I can put all those into play and have a better match and hopefully a very good one."
Azarenka continued her trouble-free run with a 6-2 6-2 victory over Georgia's Anna Tatishvili that took her tally of games conceded to 10.
It will be her first quarter-final in New York and, although she is the top seed and has looked as impressive as any player, she does not count herself as the favourite.
She said: "I think there are so many great players in the draw still. I feel like Serena (Williams) is definitely the favourite here. She's been doing amazing this summer, plus being American playing in New York.
"Also Sam being defending champion is definitely a favourite as well. Maria is playing well. There's definitely a lot of players who can pull out the win."