South Africa 347 for 7 (Rudolph 85*, Boje 31*) trail Sri Lanka 486 (Jayawardene 237, Vaas 69, Pollock 4-48) by 139 runs
Live scorecard and ball-by-ball details

Jacques Rudolph showed strong resolve and sturdy defence, keeping one end up as wickets fell around him © AFP

Muttiah Muralitharan moved ahead of Shane Warne, snapping up wicket number 528, as Sri Lanka applied pressure throughout a slow-scoring third day. But South Africa, thanks to the positive strokeplay of Jacques Kallis and the unbreaking resolve and sturdy defence of Jacques Rudolph, battled through the day to finish on 347 for 7.

At the close, 139 runs adrift with just six sessions left, South Africa had fought themselves into a position where they could save the game - a result they would have grabbed before the start, knowing full well that Colombo provided their best chance of a win. Even if Sri Lanka are able to wrap up the innings in the first hour of the fourth day, they will have to bat for at least a couple of sessions, which would leave South Africa about a day to survive.

In the morning, after a disastrous start, Kallis rescued an innings that had ground to a halt after only 14 runs were added in nearly an hour, breaking Muralitharan's rhythm with a commanding cameo. Kallis dominated a 72-run partnership with Rudolph, South Africa's new No. 3, scoring 59 of the runs from just 78 balls, hitting nine fours, and one slog-swept six off Murali.

Rudolph, meanwhile, adopted an entirely different approach, dead-batting the spinners for hour after hour and showing immense powers of concentration in very difficult conditions. Showing the resolve and determination that helped him through the early part of his career, when politics delayed his debut, Rudolph batted for nearly six hours, and faced 252 balls for his unbeaten 85.

But just when Kallis looked to have turned around the innings, Muralitharan struck for the second time in the day. Kallis had played the slog-sweep powerfully and effectively, but it always carries an element of risk. An offbreak kicked, and caught the top edge of the bat. There was still enough bat on it, though, to leave Kumar Sangakkara, scurrying around at midwicket, waiting for an age before the ball returned to earth (168 for 3). The celebrations on the dressing-room balcony - even the computer analyst was handing out high-fives - showed how highly prized Kallis's scalp was.

Jacques Kallis counterattacked wonderfully well, using his feet superbly against Murali, but was out after lunch © AFP

Graeme Smith, feeling healthy again after struggling with viral flu yesterday, walked in to bat at No. 5. Like Kallis, he tried to be positive, stroking 23 from 32 balls, but Sanath Jayasuriya trapped him in front after a half-hearted stride forward (213 for 4). Jayasuriya struck again soon, as Mark Boucher groped forward and edged to Romesh Kaluwitharana, to leave the South Africans on the back foot (225 for 5).

By tea South Africa had 257 for 5, after which Marvan Atapattu took the new ball in an attempt to wrap up the innings. But South Africa's batting is famously long, with Nicky Boje down at No. 9, and Rudolph found another stubborn partner in Shaun Pollock. They frustrated Sri Lanka for over an hour, adding 62 runs, before Chaminda Vaas finally conjured up some devil from the surface to catch the shoulder of Pollock's bat (287 for 6).

Lance Klusener, playing his first Test innings for two-and-a-half years, failed to settle, and fell to Tillakaratne Dilshan's part-time offbreaks, popping a catch to silly point (295 for 7). But still South Africa didn't crumble, as Boje got into his stride, playing industriously against the spinners and helping to whittle down the deficit some more.

Earlier, the day started with good news for South Africa, as Smith announced his recovery, but eight minutes into the day, Boeta Dippenaar was left cursing a moment of madness as he trudged slowly back to the dressing-room after gifting Sri Lanka a breakthrough.

Dippenaar, who won lavish praise the previous evening from Boucher, his acting captain, after scoring 46 from 106 balls, clipped his seventh ball to the right of Upul Chandana - Sri Lanka's best fielder - at mid-on. Chandana swooped and threw to the bowler's end, where Muralitharan shovelled the ball onto the stumps (84 for 1).

Rudolph and Martin van Jaarsveld battled hard for the next 47 minutes. Runscoring ground to a halt. Chaminda Vaas did not concede a single run in his four-over burst. As the first hour neared completion, South Africa had added just 14. Murali then struck as van Jaarsveld (37), who had added just seven runs to his overnight score in 50 balls, edged onto his pad, and was caught by Thilan Samaraweera. Some firecrackers were let off on the grassy gnolls in celebration, but the Sri Lankan players were cheering the breakthrough, not the landmark as Murali went back in front of Warne.