The Sharks booked a home Currie Cup Semi-final when they beat the Blue Bulls 16-18 in the Currie Cup at Loftus Versfeld.
Butch James kicked a penalty a minute and a half from full time to put the Sharks into the lead.
The Sharks led 6-9 at half time but they allowed the Blue Bulls take the lead in the second half.
The Sharks poor discipline almost cost them dearly as Jacques Botes was yellow craded in the 35th minute and in the second half Jean Deysel was yellow carded in the 59th minute.
The Blue Bulls moved up to fourth place in the Currie Cup standings due to their losing bonus point but they face a nervous wait and may need other results to go their way.
While the result was a knock to the Bulls' chances of reaching the playoffs, the Pretoria side clinched a bonus point out so they did take something from the match.
The Bulls moved past the Cheetahs on the log level on 17 points and next week's encounter between these sides in Bloemfontein could decide which of the teams progress to the semi-finals.
With the Bulls playing for their survival in this year's Currie Cup, they needed to produce a clinical performance against the tournament leading Sharks.
Despite conceding two yellow cards for ill-discipline, the visitors still managed to sneak through a victory in a match where a stalemate would have been a fair outcome.
The hosts had a shaky first 20 minutes of the match as they struggled particularly in the set-pieces, while the Sharks looked more composed.
The Sharks' bright young flyhalf Fred Zeilinga had two opportunities to give his side an early advantage but missed both penalty attempts.
Zeilinga finally found his target on the 10 minute mark to open the scoring, but his Bulls counterpart Handre Pollard replied with a penalty goal two minutes later to level the scores again.
The Sharks pivot further opened the gap with a penalty conversion a minute later, before adding another in the 33rd minute.
While neither of the sides showed real intent to cross the whitewash, the Bulls slowly but surely made inroads in the set phases.
Where they were clearly outmuscled during scrum time and struggling in the lineouts in the first 20 minutes, they showed greater resistance as the game progressed.
Six minutes before the half-time break the Sharks conceded their first yellow card when referee Marius van der Westhuizen sent flanker Jacques Botes to the sin-bin.
At the restart after the half-time break, the Sharks came out firing as they launched the first real attack on the advantage line as their strong ball carriers bashed their way towards the tryline.
For all their efforts, they only had three points to show for it, with Zeilinga adding another penalty conversion to extend their lead to six points.
The Bulls had an opportunity to close the gap again a minute later, but Pollard's long-range kick fell well short of the goals.
The Light Blues were given another helping hand by Van der Westhuizen in the 60th minute when the referee sent Sharks strongman Jean Deysel packing for infringements at the breakdown.
A minute later the Bulls took full advantage of being a player up with centre Francois Venter managing to get over the chalk after a strong scrum from the Bulls meters from the goalline, with Pollard converting.
Pollard added a penalty five minutes later to extend the home side's lead to four points with 14 minutes left on the clock.
The Sharks, however, held their composure and replacement flyhalf Butch James got his side within a point of the hosts with a penalty goal in the 70th minute before he had the final say in the 79th minute with another successful kick.
Final Score Blue Bulls 16 (6) Sharks 18 (9)
Tries - F.Venter
Pen - H. Pollard 3
Con - H. Pollard
Pen - F.Zeilinga 3, B.James 2
Referee: Marius van der Westhuizen
Assistant Referees: Quinton Immelman, Attie Buitendag
TMO: Deon van Blommestein
Blue Bulls: Jurgen Visser, Akona Ndungane, William Small-Smith, Francois Venter, Bjorn Basson, Handre Pollard, Rudy Paige, Jono Ross (c), Jacques du Plessis, Wiaan Liebenberg, David Bulbring, Paul Willemse, Frik Kirsten, Mbongeni Mbonambi, Marcel van der Merwe.
Replacements: Bandise Maku, Dean Greyling, Grant Hattingh, Jacques Engelbrecht, Lohan Jacobs, Ulrich Beyers, Sampie Mastriet.
The Sharks: SP Marais; Odwa Ndungane, Tim Whitehead, Heimar Williams, Lwazi Mvovo; Fred Zeilinga, Cobus Reinach; Keegan Daniel (capt), Jean Deysel, Jacques Botes; Stephan Lewies, Peet Marais; Wiehahn Herbst, Kyle Cooper, Dale Chadwick.
Replacements: Monde Hadebe, Danie Mienie, Edwin Hewitt, Marcell Coetzee, Charl McLeod, Butch James, Louis Ludik.