The pair put on 116 for the first wicket, 12 more than their partnership in the first innings. Hashim Amla joined Cook after Elgar was dismissed and played some sparkling strokes as he made 48 in a second wicket stand of 105 off 118 balls before he was out off the last delivery before tea. After two interruptions for rain, the playing hours were changed and South Africa scored 182 runs off 40 overs in an extended post-lunch period during which the Sri Lankan bowling and fielding was unimpressive. Cook, who made his third century in only seven Tests, survived a chance to gully off Suranga Lakmal when he was on 62, but played with more freedom than in previous appearances.
SCOREBOARD
-- South Africa, first innings, 286
==========================================
Sri Lanka, first innings (overnight 181-7)
==========================================
D. Karunaratne b Abbott 5
K. Silva lbw b Philander 16
K. Perera c De Kock b Philander 7
K. Mendis c De Kock b Abbott 0
A. Mathews c Elgar b Rabada 39
D. Chandimal lbw b Philander 28
D. de Silva c De Kock b Philander 43
R. Herath lbw b Maharaj 24
D. Chameera c Amla b Abbott 19
S. Lakmal c Abbott b Philander 4
N. Pradeep not out 8
Extras: (lb4, nb3, w5) 12
------------------------------------------
Total: (64.5 overs) 205
==========================================
Fall of wickets: 1-10 (Karunaratne), 2-19 (Perera), 3-22 (Mendis), 4-61 (Silva), 5-94 (Mathews), 6-121 (Chandimal), 7-157 (Herath), 8-181 (De Silva), 9-185 (Lakmal)
Bowling: Philander 20-7-45-5 (2nb), Abbott 21.5-4-63-3, Rabada 13-3-63-1 (1nb, 1w), Maharaj 10-3-30-1
==========================================
South Africa, second innings
==========================================
S. Cook c Chandimal b Chameera 117
D. Elgar c Mathews b Lakmal 52
H. Amla lbw b Pradeep 48
J. Duminy c Mathews b De Silva 25
F. du Plessis not out 41
T. Bavuma c Mendis b De Silva 8
Q. de Kock not out 42
Extras: (b5, lb1, nb9, w3) 18
------------------------------------------
Total: (5 wkts, 80 overs) 351
==========================================
Fall of wickets: 1-116 (Elgar), 2-221 (Amla), 3-244 (Cook), 4-267 (Duminy), 5-277 (Bavuma)
Bowling: Lakmal 15-2-57-1, Pradeep 14-0-65-1 (4nb, 1w), Mathews 4-0-10-0, Chameera 11-0-63-1 (1nb, 2w), Herath 23-1-76-0, De Silva 13-0-74-2
Match situation: South Africa lead by 432 runs with five wickets remaining in the second innings
Toss: South Africa
Umpires: Aleem Dar (PAK), Bruce Oxenford (AUS)
TV umpire: Rod Tucker (AUS)
Match referee: David Boon (AUS).