Serena Williams kept alive her hopes of a record-equalling 24th Grand Slam singles title with a 4-6 6-3 6-2 win over Tsvetana Pironkova in the US Open quarter-finals.
The American six-time champion, 38, struggled early on with the variety of shots from the unranked player who was in her first tournament in three years.
The Bulgarian, 32, broke in the fifth game en route to taking the first set.
Pironkova tired as Williams took the second and broke twice in the third.
The veteran will now play former world number one Victoria Azarenka or Belgian 16th seed Elise Mertens.
Like in her third-round match against Sloane Stephens, Williams made a slow start which Pironkova exploited on longer rallies and with her dangerous sliced forehand. The break seemed inevitable and came in the fifth game when the Bulgarian – a semi-finalist at Wimbledon in 2010 – hit a great double-handed backhand winner.
There were signs Williams was improving towards the end of that set, and although she did go a break down early in the second set, the American levelled immediately and then had break point in the following Pironkova service game.
That was saved, but the former world number 31 lost her serve again when she was out-thought and outplayed in the eighth game, decided by an error following a phenomenal 26-shot rally. Her more decorated opponent raised her arm and let out a cry of celebration and relief inside the near empty Arthur Ashe Stadium.
By this stage, Pironkova’s points won on her first and second serves had dropped from 87% and 70%, respectively, down to 47% and 55% and the unforced errors were up from five to 10. It seemed the exertions of the near three-hour three-set match against Alize Cornet in the previous round were beginning to take their toll.
Williams also experienced a three-set contest in her last-16 match, but her stamina appeared to increase as this match went on. She broke twice more in the third set and booked her place in the semi-final with a game to love, which contained her 20th ace.
Defeat brought an end to the fairytale return for the player from Plovdiv, who following a shoulder injury in 2017 decided to start a family and take time out from the sport.
Pironkova chose the Flushing Meadows tournament to mark her comeback and entered at the first-round stage courtesy of a protected ranking of 123rd – the position she occupied when she last played.