South Africa 4 for 1 (Elgar 4, Maharaj 0*, Herath 1-1) trail Sri Lanka 287 (Karunaratne 158*, Gunathilaka 26, Rabada 4-50, Shamsi 3-91) by 283 runs
An unbeaten century from Dimuth Karunaratne neutralised the South African threat on the opening day of the Test series in Galle, after the visiting attack burrowed their way through Sri Lanka's middle order. Playing in his 50th Test, Karunaratne was the only Sri Lankan batsman to score more than 26 runs and featured in five partnerships of over 40 - the last stand of 63 with Lakshan Sandakan - to ensure that even though Sri Lanka lost six wickets for 61 at one point, they ended the day on top.
Kagiso Rabada emerged as a the spearhead of the South African pack, with 4 for 50 on a surface that offered scant assistance. He outbowled both his seniors - Vernon Philander, who only delivered eight overs, and Dale Steyn, who took one step closer to breaking Shaun Pollock's record as South Africa's leading Test wicket-taker. For Steyn, two more remain. Tabraiz Shamsi, the left-arm wristspinner who was included alongside Keshav Maharaj, was the other threat, which only suggests it will become tougher for batting as the match progresses.
That places even more value on the runs Sri Lanka's lower order provided. Their last two pairings put on 111 runs to push their total towards 300. At 176 for 8, even 200 seemed distant, and South Africa will rue their inability to finish off the tail, especially as they had an early chance to do so.
Three balls after the eighth wicket fell, Shamsi appealed for lbw against Suranga Lakmal, after pitching one on off stump that struck the stand-in captain in front of middle, but umpire Paul Reiffel gave it not out. South Africa had a review in hand but did not use it and replays showed the ball would have gone on to hit the inside of leg stump.
South Africa also failed to review one in the first over, when Danushka Gunathilaka flicked Vernon Philander down leg and there was an audible sound. Reiffel gave it not out but replays showed a spike on Ultra Edge. But, that missed chance did not prove too costly. After Gunathilaka and Karunaratne achieved Sri Lanka's best opening stand in their last 16 innings, Rabada removed Gunathilaka when he found his outside edge with some extra bounce.
Still, Karunaratne ensured Sri Lanka had a productive morning and took advantage of any width and the short ball. He provided the only six of the innings, albeit almost by accident, when he hooked Steyn over the gap between long leg and deep-backward square leg.
Sri Lanka were initially circumspect against spin, and Dhananjaya de Silva was hesitant to get his front foot across to Keshav Maharaj, but that cost him his wicket when Shamsi came on. De Silva tried to drive Shamsi through the covers but left a bat-pad gap and was bowled for 11. Shamsi continued bowling from that end for the entire second session but more success only came after the major damage had been done.
Steyn returned after lunch to an aggressive Karunaratne, who went after the short ball again and with more control, but got a wicket unexpectedly when the new-to-the-2,000-Test-run-club-member Kusal Mendis chipped him to mid-on. Rabada received the catch and four overs later, replaced Steyn and rocked Sri Lanka. Angelo Mathews and Roshen Silva were dismissed in three balls to leave Sri Lanka teetering on 119 for 5.
And Rabada continued to threaten. In his next over, he had Niroshan Dickwella given out lbw but the batsman reviewed and the ball was found to be pitching outside leg. With the next ball, Rabada hit Dickwella on the helmet. South Africa sensed they may be able to rip through Sri Lanka when Quinton de Kock thought he had Dickwlla caught behind in the next over off Shamsi, and reviewed after Reiffel disagreed, but the on-field umpire was proved correct. Shamsi had the last laugh when Dickwella edged him to first slip - reward for a spell in which he demonstrated consistency of length.
A rain break delayed the third session but it began with Shamsi thinking he had another wicket when Dilruwan Perera was given out lbw. He reviewed and ball-tracking showed the ball - which pitched outside off - would have turned past leg stump, perhaps explaining South Africa's reluctance to review against Lakmal later on. Philander got rid of Dilruwan in the next over, returning to the action in the 48th over, after bowling four of the first eight overs, and provided the throw that ran Rangana Herath out but from there, it was the Karunaratne show.
He brought up his century off 159 balls with a straight drive off Shamsi, whose consistency waned as the afternoon wore on. Steyn provided a few more short balls for the Sri Lankan to tuck into before 150 came up off 215 balls (his third fifty taking just 56 balls), also off Shamsi. Karunaratne eventually ran out of partners but his job was complete.
And just as South Africa's openers would both have wanted to emulate Karunaratne, only one was able to. Dean Elgar, also playing in his 50th Test, survived the four overs but Aiden Markram, on his first tour of the subcontinent, did not. He was caught at slip off Herath, who opened the bowling, to hand Sri Lanka the advantage.