Waratahs flyhalf Bernard Foley beats Highlanders loose forward Liam Squire to score a try as part of his 25-point haul on Saturday. Photo: Craig Golding/EPA

SYDNEY – Bernard Foley scored two of the Waratahs’ three tries as they overturned a 17-point deficit while they had a man advantage to beat the Highlanders 30-23 in their Super Rugby quarter-final on Saturday.

The Waratahs had been trailing 23-6 until Waisake Naholo was yellow-carded for two successive high tackles, as the Highlanders scrambled back in defence following an intercept on his own tryline by Waratahs wing Taqele Naiyaravoro.

Foley, who ended with 25 points, and Israel Folau crossed as the home side turned their deficit into a 27-23 lead they managed to extend.

They held on despite being reduced to 14 men for the final eight minutes after replacement prop Paddy Ryan was sin-binned.

Naholo and Rob Thompson scored tries for the Highlanders, who had been looking odds-on favourites for a semi-final against either the Lions or Jaguares next week, before the All Blacks wing was sin-binned.

“I had full belief in this team. They’ve always shown fight and we’re never out of a game and how the guys responded after halftime, we just showed belief,” Foley said. “We knew that belief would get us out of it... that’s a special win for us.”

The Waratahs had destroyed a 14-man Highlanders 41-12 at the same venue in May.

And the visitors had not been at their best since the June international break, with two losses and a tight win over the Melbourne Rebels.

The visitors, however, played with more control and purpose than the home side as Aaron Smith and Lima Sopoaga orchestrated their attack, while Luke Whitelock, Tom Franklin and Jackson Hemopo marshalled the defence as their teammates did the basics well and kept the scoreboard ticking over.

Sopoaga had a hand in setting up both Naholo and Thompson’s first-half tries, while he added three penalties to put scoreboard pressure on the Waratahs, whose only points before halftime came from two Foley penalties.

The Highlanders continued to dominate in the second half and hammered away without success until Naiyaravoro made his crucial intercept that ended up turning the game back to the home side.

Sensing their chance, the Waratahs capitalised and Foley crossed twice, while Folau also scored as they turned the deficit into a 27-23 advantage with 20 minutes remaining.

They then held out for the final eight minutes despite having Ryan sin-binned for a professional foul.

“I’m pretty gutted... it’s a tough pill to swallow,” a dejected Highlanders captain Ben Smith said.

“The Waratahs got on a bit of roll and we battled to get the momentum back. We still had our chances at the end there, but... that second half was not a good reflection of where we are as a team.”