Cape Town - A superb Dean Elgar century stole the show on day one of the second Test between the Proteas and Sri Lanka at Newlands on Monday.
LIVE: SA V SRI LANKA, DAY 1
Elgar was eventually dismissed in the final half-an-hour of the day's play for a career-best 129.
By the time he was done, he had batted for a marathon 362 minutes, facing 230 balls and hitting 15 fours.
At stumps, the Proteas were 297/6 with Quinton de Kock 68* and Kyle Abbott 16*.
After a testing day with the bat, it was the 103-run sixth-wicket partnership between Elgar and De Kock that swung the momentum back the way of the hosts.
De Kock reached his 50 off just 58 balls to provide exactly the impetus South Africa needed late in the day, but it was Elgar who really stepped up for the Proteas.
Elgar's innings was not only expertly manufactured, but it was one that the Proteas desperately needed after they had lost Stephen Cook in the first over of the day and then slumped to 66/3.
Throughout all of the uncertainty, Elgar stood firm as he employed his now familiar grittiness once again to register his sixth Test century.
The celebrations that followed showed just how much the knock meant to Elgar, who had carded scores of 45 and 52 in the first Test in Port Elizabeth without pushing on.
When Suranga Lakmal had Elgar caught behind with the second new ball, an almost-packed Newlands rose to clap off the opener after an innings that could be crucial in the context of the series.
As the day wore on and the sun eventually became a permanent fixture, batting appeared to get easier.
But with cloud cover in the air and the wicket showing more than a tinge of green, Sri Lankan captain Angelo Mathews had no hesitation in opting to bowl first.
It initially looked to be the right call as the hosts slipped to 66/3 just before lunch with Cook (0), Hashim Amla (29) and JP Duminy (0) all back in the hut.
A 76-run partnership between Elgar and captain Faf du Plessis (38) then saw the Proteas fight their way back into the match.
The skipper, who looked in fine touch despite being dropped by Upul Tharanga on 31, was out for 38 when he slashed at a wide delivery from Rangana Herath to edge to Angelo Mathews at slip.
Elgar and Du Plessis had been largely solid as they provided exactly the application the South Africans needed, but the breakthrough just before tea swung the momentum back in the visitors' favour.
Temba Bavuma, in need of runs, failed again just after the start of the final session when he was out for 10 looking to go after a short ball from teenager Lahiru Kamara.
Bavuma was Kamara's third victim of the day.
Cook, having bagged 176 runs in the first Test in Port Elizabeth, had earlier come crashing back down to earth when he was out for 0 on just the fourth ball of the morning to leave the Proteas at 0/1.
The wicket taker was Lakmal, easily Sri Lanka's most impressive seamer from the first Test.
It was a fine fast bowler's dismissal.
Cook probably could have left it alone, but the line and length tempted him into a feel just outside his off stump as he edged through to the keeper.
Amla then arrived at the wicket to a huge roar from the crowd as he continued his quest for form.
A 66-run partnership with Elgar followed.
Both players were patient as they weathered the early storm, waiting for anything too straight or over-pitched to score off.
Amla again looked like he was on the verge of the big knock that has eluded him, but he was bowled for 29 with a full delivery from Kamara that nipped back off the seam.
Kumara then rocked the Proteas five balls later, in the same over, when he had a hooking JP Duminy caught down the leg side for 0.
It was a brilliant catch - Kusal Mendis launching himself to his right to pouch it behind the stumps.
Dean Elgar, Stephen Cook, Hashim Amla, JP Duminy, Faf du Plessis (captain), Temba Bavuma, Quinton de Kock, Vernon Philander, Keshav Maharaj, Kyle Abbott, Kagiso Rabada
Dimuth Karunaratne, Kaushal Silva, Upul Tharanga, Kusal Mendis, Angelo Mathews (captain), Dinesh Chandimal, Dhananjaya de Silva, Rangana Herath, Lahiru Kamara, Suranga Lakmal, Nuwan Pradeep