Sydney - The Waratahs were pushed to the limit before fending off the Sharks 33-18 in in Sydney on Saturday.
The Waratahs only sealed the match with a runaway solo try by Bernard Foley in the final minute after a Sharks handling error.
The win took the Waratahs to the top of the Australian conference.
The win didn't come without some controversy with the Durban-based Sharks missing out on a try in the corner while trailing 26-18 only for the video referee to rule that winger Sibusiso Sithole's knee had come in contact with the sideline in the process of diving over to score.
The Sharks have now not won in Sydney since 2000.
"The Sharks played well, they stuck to their strengths, there were a lot of kicks and didn't give us much opportunity in their 22," Waratahs skipper Dave Dennis said.
"And when we got down there we were probably a little bit too impatient and turned the ball over, but pleased to get the result in the end."
Sharks skipper Marco Wentzel said his team couldn't keep the pressure on the Waratahs.
"We lost a lot of ball through turnovers and they scored. They are a quality side and if you make mistakes they punish you," he said.
The Waratahs face a rematch of last season's final against the Crusaders in Sydney next week, while the Sharks play the Reds in Brisbane.