Opener Aiden Markram's half-century on Thursday provided South Africa with much-needed support after early problems on the second day of the first Test against Pakistan, which was played at the SuperSport Park, Centurion.
The Proteas concluded the opening day of the first Test, scoring 82 runs for the loss of three wickets.
The Proteas faced an early setback at the start of their innings when Pakistan's Khurram Shahzad dismissed opener Tony de Zorzi in the third over.
Ryan Rickelton then joined Aiden Markram, but Shahzad struck again, removing the newcomer after he contributed just eight runs to the scoreboard.
Tristan Stubbs came in to replace Rickelton and faced 28 balls, while Markram piled up runs steadily. However, Stubbs' cameo was short-lived as he was dismissed for nine runs by Mohammad Abbas.
Markram continued to lead the innings, and was then joined by captain Temba Bavuma. The pair batted with confidence towards the end of the day.
At the start of the second day, Markram had reached 53 off 72 balls, while Bavuma had added four runs off 31 deliveries.
Earlier, South Africa's pacers had dismantled Pakistan's batting line-up, putting them on 211 runs in their first innings. Dane Paterson claimed a five-wicket haul, Corbin Bosch took four wickets and Marco Jansen secured the final scalp.
Pakistan's struggles began early, with opener Saim Ayub falling for 14 and captain Babar Azam dismissed for just 4. Shan Masood made 17, while Saud Shakeel added 14 runs before being sent back to the pavilion.
The only significant resistance came from Kamran Ghulam, who was the top scorer with 54. However, the decline continued with the dismissals of Mohammad Rizwan (27 off 62), Salman Ali Agha (18 off 34) and Aamer Jamal (28 off 27 ). .
Naseem Shah went for a duck, leaving Khurram Shahzad and Mohammad Abbas to save the innings. The duo's brave partnership helped Pakistan cross the 200-run mark, but it was soon broken by Marco Jansen, who dismissed Khurram to close Pakistan's innings.
South Africa had earlier won the toss and opted to play Pakistan first.