The Waratahs crept into the top eight in overall standings with a 20-15 victory over the Melbourne Rebels at AAMI Park in Melbourne.
The 'Tahs have now won their last five previous matches at the home of the Rebels and both of their encounters with Dave Wessels' side this season.
The Waratahs opened the scoring via a first-phase move from a scrum penalty. The ball was swung out from right to left, with Kurtley Beale releasing Curtis Rona on the outside, who broke the line before popping inside for Foley, who in turn popped the ball on the inside for Adam Ashley-Cooper to complete a superb backline team try.
Waratahs lock Rob Simmons was then penalised for not releasing Quade Cooper, who struck the resulting penalty through the poles to reduce the deficit to four.
Foley extended the lead back to seven points with a three-pointer after Rebels second-rower Matt Philip was guilty of entering a ruck from the side.
The Waratahs won another penalty inside Rebels territory in the 22nd minute as the Rebels backline was caught offside during the line-out. Foley did the rest from the tee to make it 13-3.
The Rebels began to pile the pressure on the Sydneysiders, coming close on three successive occasions; first from a Marika Koroibete surge to the line, then from a rolling maul that was held up and finally Quade Cooper was denied a five-pointer after Anaru Rangi knocked on in the build-up.
But the 'Tahs somehow escaped and went in to the interval with a 13-3 lead.
The Rebels continued to pile on the pressure after the break and won a lineout in Waratahs' territory. From the lineout on the right-hand side, the ball was swung to the left. Koroibete drew two defenders and played in Dane Haylett-Petty, who offloaded brilliantly for Cooper to finish and convert his own try to reduce the arrears to three at 10-13.
But the visitors hit back almost immediately. Reece Hodge carried the ball back over his own line under pressure and as a result, the 'Tahs had a scrum in a great position. From the set-piece, the ball was passed blindside to Ashley-Cooper, who got on the inside of Jack Maddocks before throwing the ball back in through Hodge's legs to Rona, who kicked through and dived on the ball.
The pendulum of the game swung back to the hosts. Hodge was pushed in to Foley by Haylett-Petty as the players contested the aerial duel, with Paul Williams deeming it as an accidental collision, as the scrum went to the Rebels. After taking the ball through the phases, Koroibete was the spark once again, breaking through and offloading to Genia, who drove over. Cooper failed to convert as the score remained 20-15.
The Waratahs managed to hold on to that lead until the end and record a crucial victory.
For the Rebels
Tries: Cooper, Genia
For the Waratahs
Tries: Ashley-Cooper, Rona
Cons: Foley (2)
Pens: Foley (2)
Melbourne Rebels: 15 Dane Haylett-Petty (c), 14 Jack Maddocks, 13 Reece Hodge, 12 Matt To’omua, 11 Marika Koroibete, 10 Quade Cooper, 9 Will Genia, 8 Isi Naisarani, 7 Richard Hardwick, 6 Luke Jones, 5 Adam Coleman, 4 Matt Philip, 3 Jermaine Ainsley, 2 Anaru Rangi, 1 Tetera Faulkner
Replacements: 16 Hugh Roach, 17 Matt Gibbon, 18 Sam Talakai, 19 Ross Haylett-Petty, 20 Angus Cottrell, 21 Michael Ruru, 22 Billy Meakes, 23 Tom English
Waratahs: 15 Kurtley Beale, 14 Alex Newsome, 13 Adam Ashley-Cooper, 12 Lalakai Foketi, 11 Curtis Rona, 10 Bernard Foley, 9 Nick Phipps, 8 Michael Wells, 7 Michael Hooper, 6 Lachlan Swinton, 5 Rob Simmons, 4 Ned Hanigan, 3 Sekope Kepu, 2 Damien Fitzpatrick, 1 Tom Robertson
Replacements: 16 Andrew Tuala, 17 Harry Johnson-Holmes, 18 Chris Talakai, 19 Jed Holloway, 20 Will Miller, 21 Jake Gordon, 22 Mack Mason, 23 Cameron Clark
Referee: Paul Williams (New Zealand)
Assistant Referees: Egon Seconds (South Africa), Jaco Peyper (South Africa)
TMO: James Leckie (Australia)