All-rounder Thisara Perera sparked a turnaround for Sri Lanka in the second One-Day International against South Africa at SuperSport Park on Wednesday.
Thisara took three for 26 as South Africa was bowled out for 251 after being sent in.
South Africa seemed set for a huge total when Quinton de Kock gave them a blazing start, hitting 94 off 70 balls. But the innings changed dramatically when Thisara, playing in his 150th ODI, had de Kock caught behind.
Missing out, again
de Kock, who made 83 and 81 in his previous two ODIs and had innings of 86 and 80 in two Tests against Sri Lanka, hung his head in disappointment after missing another chance of making a century. De Kock was in sublime form, striking 17 fours and a six.
At that stage South Africa was 131 for two in the 21st over, scoring at better than six runs an over.
Thisara followed up by having Rassie van der Dussen caught at deep midwicket for two before bowling South African captain Faf du Plessis with a ball which kept low.
Despite du Plessis making 57 off 66 balls, the innings never regained its early momentum. South Africa, having picked only five specialist batsmen, lost its last six wickets for 31 runs.
South Africa leads the five-match series 1-0 after an eight-wicket win in the first game in Johannesburg.
Scoreboard
South Africa: Q. de Kock c Dickwella b T. Perera 94, R. Hendricks c Dananjaya b Malinga 29, F. du Plessis b T. Perera 57, H. van der Dussen c Rajitha b T. Perera 2, W. Mulder b V. Fernando 17, D. Miller st. Dickwella b de Silva 25, A. Phehlukwayo c A. Fernando b de Silva 2, K. Rabada c Dickwella b Rajitha 3, A. Nortje lbw b Malinga 8, L. Ngidi st. Dickwella b Dananjaya 6, Imran Tahir (not out) 1; Extras (w-7): 7; Total (in 45.1 overs): 251.
Fall of wickets: 1-91, 2-131, 3-137, 4-176, 5-220, 6-225, 7-235, 8-239, 9-249.
Sri Lanka bowling: Malinga 9-0-39-2, V. Fernando 5-0-47-1, de Silva 8-0-55-2, Rajitha 7-0-46-1, Dananjaya 9.1-1-38-1, T. Perera 7-0-26-3.
Toss: Sri Lanka