The NSW Waratahs survived a frenetic second-half comeback from the Western Force to post a 23-18 Super Rugby triumph in Perth on Friday night.
The Waratahs appeared set to run away with the match after tries either side of half-time to winger Tom Kingston and flanker Dave Dennis gave the visitors a 17-3 lead.
However, a brilliant 20-minute period for the Force, in which the home side piled on 15 unanswered points, put the game in the balance.
The Waratahs were clearly rattled but the reliable boot of Berrick Barnes got them over the line, the five-eighth's penalties in the 64th and 74th minutes securing victory in front of 12,838 fans.
NSW's third win of the season moved them to top of the Australian conference on 21 points, but the Brumbies have the chance to leapfrog them when they take on the Rebels on Saturday.
Queensland's points tally will increase to 21 once they get the automatic four points for their bye this week.
The Force, with just two wins from eight games, remain last in the Australian conference on 13 points ahead of next week's bye.
Both sides were willing to throw the ball around in the opening half, but the Waratahs created the better opportunities.
NSW went ahead through an early Brendan McKibbin penalty and they were celebrating the first try of the match in the 26th minute when Kingston burned off Force flanker Matt Hodgson to touch down in the corner.
Force first five-eighths David Harvey's 31st-minute penalty brought the margin back to 10-3, but the home side were on the back foot for the remainder of the half.
The unrelenting pressure eventually took its toll, with Force prop Salesi Ma'afu sin-binned in the 38th minute for repeated infringements.
The Force's defence was on the job in the first half, but fell asleep two minutes after the break.
Dennis couldn't believe his luck as he sliced his way through to the tryline after collecting a short line-out and things were looking bleak for the Force at 17-3 down.
But just 20 minutes later Force half Brett Sheehan started the fightback when he poked through a number of arms and legs to touch down in the 50th minute.
And when Waratahs fullback Bernard Foley was yellow carded in the 58th minute, the visitors looked vulnerable.
The Force turned down the easy three points on offer and were duly rewarded, with a series of quick passes allowing fullback Alfie Mafi to stroll over.
A penalty to Harvey gave the Force the lead for the first time in the match, but Barnes was ice cool when it counted, nailing two crucial penalties to seal victory.
"That was certainly a killer for us," Force coach Richard Graham said of the Tahs' soft second try.
"You defend so well for five or six minutes and then you concede a try like that. Ultimately something like that has a huge bearing on the outcome."
Waratahs coach Michael Foley said he was thrilled with the way his team fought back after the Force took the lead.
"To come out after a bye is always difficult but probably helped us in the end," Foley said.
"We finished stronger than the Force.
"We played some good rugby in the first 40 minutes but there were a couple of decisions we made that let them back in the game at crucial times in that third 20 minutes of the match."