Sri Lanka 42 and 103 for 5 (Chandimal 29*, Jansen 2-22, Rabada 2-34) need another 413 runs to beat South Africa 191 and 366 for 5 dec (Stubbs 122, Bavuma 113, Vishwa 2-64)
Temba Bavuma and Tristan Stubbs eased to Test centuries in the first two sessions, making South Africa's lead gargantuan, before the quicks snapped up five Sri Lanka wickets. Having utterly dominated the match since lunch on day two, South Africa finished the third day only five wickets short of going 1-0 up in a vital World Test Championship series. Sri Lanka are 413 runs adrift, on a surface on which the bounce can no longer be fully trusted.
The late Sri Lanka wickets produced some drama, but it was the 249-run partnership - which equalled a record for the fourth wicket at this ground - that was the centerpiece of Friday's action. Stubbs and Bavuma had laid the groundwork for their centuries in the morning, negotiating some occasionally testing early overs.
It was clear that by then, however, the Kingsmead pitch had lost much of the nip it had had in the first few sessions of this match. South Africa raised their tempo in the second session, going at 4.81 runs an over in the afternoon.
The Sri Lanka quicks were down on pace on day three, as perhaps could be expected of an attack that was closing in on 150 overs for the match. They did, eventually manage to dismiss Stubbs and Bavuma late in the second session. But by that stage, South Africa's lead had ballooned to more than 500. When they declared at tea, only five wickets down, they had set Sri Lanka 516 to win.
It was the two South Africa batters' hundreds, however, that most enthused the crowd at Kingsmead, and the more dramatic of the trips to triple figures was Bavuma's. He had appeared tentative in the 90s, with Sri Lanka raising lbw appeals against him, and forcing plays and misses as well.
Bavuma getting to his third century provided the most dramatic moment of the day. Batting on 98, he had got low to lap sweep Prabath Jayasuriya, and was hit on the pad. The umpire turned down the lbw appeal as the batters ran three.
But having removed his helmet to celebrate, he was made to wait a little longer, when Sri Lanka reviewed the decision. Thankfully for Bavuma, real-time snicko had caught the very slight deflection off his glove into pad, and as soon as this was shown on the big screen, Bavuma swung his bat in the air, and the crowd acknowledged him, even before the final "not out" decision came. This was only his third career ton, but his second as captain.
Stubbs got to his second Test hundred in more straightforward fashion. He had spent only 14 balls in the 90s, before working Asitha Fernando through midwicket for a couple to complete the milestone. Stubbs was given lbw in the next over, off Lahiru Kumara, but he reviewed and the ball was found to have struck him outside the line of off. In the first session, he had also been dropped for 33 off Vishwa Fernando, by Angelo Mathews, who spilled a chance low to his left at slip.
Although conditions had eased, Bavuma and Stubbs batting out the entire first session was nevertheless extraordinary, given 19 wickets had fallen the previous day. Both were cautious to start with, as Kumara went short at the batters, and Jayasuriya flighted the ball, searching for early dismissals.
Stubbs, typically, was stronger down the ground, while Bavuma was more adept at hitting square, often using his feet to the spinner, and occasionally playing the hard, flat sweep in addition to the dinky one past the keeper. Aside from that one chance off Stubbs, both batters appeared largely in control, though there were occasional lbw shouts - none of which was especially close.
In the final session, South Africa's quicks were rampant again, and Sri Lanka's batters continued to be indisciplined, even as the light waned and the opposition was still running hot. Sri Lanka also managed to burn all three of their reviews, with Pathum Nissanka and Angelo Mathews reviewing lbw decisions that were more or less plumb, before Kamindu Mendis reviewed after providing a feather edge to the wicketkeeper.
When confirmed out, it was Kamindu's first twin failure in his nine Tests so far, having fallen for 13 in the first innings, and 10 in this one.
South Africa's taller quicks got more out of the surface than Sri Lanka's seamers had earlier in the day, though Mathews' lbw in particular was down to low bounce - the ball shooting through into his pads, although he had expected it to bounce up to perhaps waist height. That was off the bowling of Marco Jansen, who now has nine wickets in the match.
But it was Kagiso Rabada who had made the first breakthrough, having Dimuth Karunaratne caught at third slip, as the opening batter drove on the up at a ball well outside off stump in the fifth over of the innings. Rabada also took the last wicket of the day - that of nightwatcher Jayasuriya, who fell to a spectacular reflex catch by short leg Tony de Zorzi.