Serena Williams faced her toughest obstacle yet at the US Open but she passed the test in three sets to reach the semi-finals at Simona Halep's expense.
Williams and fifth seed Halep went toe-to-toe in an absorbing quarter-final tussle at Flushing Meadows on Wednesday, a contest that ebbed and flowed into a third and deciding set.
But 22-time grand-slam champion Williams, despite an uncharacteristically high number of unforced errors, held her nerve when it mattered most to post a 6-2 4-6 6-3 win.
Williams' 309th major victory earned her a semi-final showdown with 10th seed Karolina Pliskova.
Tennis icon Billie Jean King, Tony Bennett, singer and producer Pharrell Williams, Golden State Warriors star Draymond Green and New York Giants wide receiver Odell Beckham Jr were all in attendance and they were treated to a see-sawing battle.
Williams - boasting a 7-1 head-to-head record before play - came out all guns blazing, her shoulder problems a distant memory, as her power and precision rattled Halep, racing out to a 3-0 lead.
Last year's semi-finalist Halep eventually held serve in the fourth game to get on the board and that appeared to kick-start the Romanian, breaking to earn the chance to put the match back on serve.
It was the first time Williams had been broken at the tournament but that is as good as it got for Halep as she gifted the break back to her relentless opponent, who closed out the opening set.
Halep continued to have her chances in the second set, and she converted a hard-fought break at the fourth time of asking before consolidating for a 3-1 lead.
The long rallies took a lot out of Williams, but she continued to dig deep, even earning a break point as Halep served to force a third set. However, Halep's forehand got her out of trouble on numerous occasions on Wednesday and it did again in the 10th game for a decider.
Williams failed to convert any of her 12 break-point opportunities in the second but it was a different story in the final set, after she broke Halep for a 3-1 lead.
The 34-year-old consolidated before powering into the final four.
Williams  bt Halep  6-2 4-6 6-3
Williams - 50/43
Halep - 20/17
Williams - 18
Halep - 1
BREAK POINTS WON
Williams - 4/20
Halep - 2/9
FIRST SERVE PERCENTAGE
Williams - 57
Halep - 65
PERCENTAGE OF POINTS WON ON FIRST/SECOND SERVE
Williams - 77/51
Halep - 64/39
Williams - 109
Halep - 92