The Waratahs will take on the Lions in Johannesburg in the Super Rugby semi-finals next weekend after claiming a come-from-behind victory over the Highlanders.
Trailing by 17 points at the break against the Kiwis at Allianz Stadium, the Waratahs piled on three unanswered tries in eight minutes and took the lead with 19 minutes to go.
A yellow card to Highlanders winger Waisake Naholo was the trigger for the rush of points, that ended up as 24 unanswered points by full-time.
Flyhalf Bernard Foley was back to his scoring best, with two tries, three penalties and three conversions giving him a career-high 25 points for the match.
The Waratahs were cheering for the Jaguares to beat the Lions at Ellis Park a few hours later, with the chance to host a semi-final next weekend if an upset occurred.
But the South Africans held off the fast-finishing Argentinians to secure a 40-23 win and hosting duties for a clash with NSW on Saturday night.
The Waratahs will fly out on Sunday morning and with history full of fruitless trips to Africa for finals campaigns, NSW will be rueing their missed opportunity to finish second a week earlier with a win over the Brumbies.
But Daryl Gibson's men will at least be armed with confidence after a stirring quarter-final win over the Highlanders.
There was much conjecture about which version of the Waratahs would turn up against the Highlanders, and at the outset it appeared as though it was the version that fell to the Lions in April and the Brumbies last week.
Basic errors in defence, missed tackles, pushed passes in attack and a shift towards using Taqele Naiyaravoro as a midfield battering ram all undid the Waratahs early.
The danger signs were there - spectators saw it in that scoreless Lions game and there were flashes of the same things just a week ago as they let a top two spot slip against the Brumbies.
This time, though, the fight came out in the second half and when the opportunity came they took it, with a tireless effort from halfback Nick Phipps setting the tone for the shift.
Both sides took the opportunity to bank points early, but it was Highlanders flyhalf Lima Sopoaga who put Naholo over in the 10th minute for the first try, capitalising on a Curtis Rona missed tackle.
A Kurtley Beale intercept looked like setting Bernard Foley over, but they were smothered by desperate Highlanders defence, an event that became a trend for them early on.
Highlanders centre Rob Thompson snuffed out the Waratahs’ momentum, compounding an early 5-2 penalty count in the Highlanders’ favour.
Sopoaga kept ticking the scoreboard over with his boot as the Highlanders wrestled control of the encounter and the Waratahs began to unravel, stretching their lead to 17 points at half-time.
The Waratahs weren’t quite ready to give up the fight in the second half and a yellow card for Waisake Naholo gave them the window they needed
Foley was the first man over in the 54th minute and then it was Israel Folau, off a brilliant Kurtley Beale break, whittling the gap to three points.
That duo teamed up for the third in the flurry of tries, Folau setting up the score with an impressive individual effort for Foley to finish off, putting them ahead for the first time since the ninth minute of the match.
Another Foley penalty made things just a little bit more comfortable for the Waratahs with 10 minutes to go, with the Highlanders well and truly back to their full complement.
With 15 men, the Highlanders pressed and pressed, testing the patchy Waratahs defence to its limits and they looked like breaching it in the 72nd minute.
The grounding attempt fell short but Waratahs prop Paddy Ryan was sent to the bin, leaving the Waratahs in a precarious position just short of their own line.
A Highlanders knock on gave the Waratahs another chance and though they kicked it straight down the throats of the Highlanders on attack, they ultimately gritted their way to an unlikely win.
NSW will be sweating on an injury to workhorse Michael Wells, who had to be helped off at the half-hour mark after being knocked out attempting to make a tackle. Rob Simmons also left the field with a head knock.
Injured captain Michael Hooper is set to miss the semi-final, too, with Gibson saying he'd only be right if they made the final a week later.
"I thought we were really poor in the first half. We lost four line outs, couldn’t get any possession, couldn’t hang onto anything. Couldn’t string any phases together. We were getting behind in the penalty count,” Gibson said.
"On balance we played very poorly and still won the game. It shows we are a good side and we have plenty of growth in us. We have things we have to fix up for next week but those are things that are easily fixable, we had a good line out all year.”
Tries: Foley 2, Folau
Cons: Foley 3
Pens: Foley 3
Yellow Card: Paddy Ryan (74')
Tries: Naholo, Thompson
Cons: Sopoaga 2
Pens: Sopoaga 3
Yellow Card: Waisake Naholo (52')