Six-time champion Serena Williams battled through a challenging three-set test against Greek 15th seed Maria Sakkari to reach the US Open quarter-finals.
Williams, 38, looked composed as she took the first set in 37 minutes.
The third seed lost a close tie-break in the second and was forced to find her best tennis to come from a break down in the third and win 6-3 6-7 (6-8) 6-3 almost two hours later.
"I just kept fighting," Williams said.
"She was doing so well. She was being so aggressive and I knew I needed to do the same thing."
Williams plays French world number 56 Alize Cornet or Bulgaria's Tsvetana Pironkova - playing her first tournament since Wimbledon 2017 - next.
The American is seeking a 24th Grand Slam singles title as she attempts to equal Margaret Court's record.
Williams had initially looked vulnerable when she went a set down in her third-round match against Sloane Stephens and again it was Sakkari who had the faster start.
The pair had met two weeks previously in the last 16 of the Western and Southern Open, when Williams let a set and break lead slip to lose.
The seven-time Wimbledon champion was threatened when Sakkari set up three break points at 2-2 in the first set, but the Greek could not take the early opportunity.
The momentum changed hands as Williams dominated a rally with pacy forehands to break the world number 22's serve at the third attempt.
And an ace down the middle sealed a hold to love to give the American the first set.
Sakkari raises level to meet Williams' power
Williams' serve saved her on several occasions, reaching 124mph at one point. Sakkari had a chance to break at 3-2 and 40-40 in the second set, but Williams slammed the door shut with two aces.
And the seven-time Australian Open champion was just as powerful from the baseline, with an incredible forehand overwhelming Sakkari and switching the momentum in the seventh game.
The Greek upped her intensity to meet Williams' level and a net cord in her favour gave Sakkari set point and elicited a pained cry from Williams.
More impenetrable serving saved that and a second set point, taking it to a tie-break.
An 89mph forehand and another booming backhand saved a further two set points for Williams, but eventually her forehand sailed wide to give Sakkari the set.
Williams' fitness holds up in three-set test
Closing out victories has been an issue for Williams recently, with her three-set loss to Sakkari two weeks ago the latest example.
And, though Williams was increasingly fired up, it looked as though history could repeat itself when Sakkari went a break up in the first game of the third set.
Williams was breathing heavily as she darted back and forth along the baseline to cling on to her service game.
"The breaks are a bit longer with the fans here," she said after the match. "I could have used that a little bit in this match."
Undeterred, Williams passed Sakkari with a cross-court forehand to put it back on serve and a gritty service game helped her lead for the first time in the decider.
The younger player showed she would not be capitulating as she served an ace to hold to love but Williams continued to bring her best level.
A scorching forehand winner on the line paved the way for three break points and she took the third as Sakkari's forehand found the net.
Williams was unrelenting as she served for the match, closing out an entertaining contest as the Greek was unable to return another powerful cross-court backhand.