Opener Aiden Markram made a return to form as he scored 78 to help South Africa into a strong position on the opening day of the second Test against Pakistan at Newlands on Thursday.
Markram's contribution put South Africa on 123 for two wickets at close, 54 runs behind after bowling out Pakistan for 177 at tea.
South Africa, who won the first of the three-Test series by six wickets in Pretoria last week, will be confident of building a substantial first-innings lead after their four-man seam attack ripped through the Pakistan batting line-up.
The 24-year-old Markram, who struggled on tour in Sri Lanka in July and in the Boxing Day Test against Pakistan, was bowled on the last ball of the day by Shan Masood.
Hashim Amla, who is 24 not out, will resume on Friday with captain Faf du Plessis, who went out for a pair in the first Test.
The solid home batting performance contrasted with Pakistan’s opening innings as they were flayed with a constant barrage of pace.
Duanne Olivier added to his 11 wickets in the first Test with four more as Du Plessis' decision to put Pakistan into bat, and go with a seam-only attack on a quick wicket, was vindicated.
Pakistan were teetering at 75-5 at lunch and lost five more wickets before tea despite 56 from captain Sarfraz Ahmed, who went out to an injudicious uppercut shot just when a fightback looked on the cards.
Masood made 44 with Olivier's figures of 4-48 bookended by veteran Dale Steyn, who took the first wicket of the day and the last two of the Pakistan innings for 3-48.
Virat Kohli gets booed again
Agarwal credits Dravid for instilling confidence in his batting
What a dramatic year it has been for cricket!
PIX: Tearful Tendulkar bids Achrekar Sir final goodbye
This is what makes Sport so amazing!