Wickets for Khurram Shahzad and Mohammad Abbas saw Pakistan break through the top of the batting order to leave their hosts trailing by 129 runs at the close on Thursday.
Khurram dismissed both Tony de Zorzi (2) and Ryan Rickelton (8) cheaply to see South Africa struggling early in their reply while Abbas, on his return to test cricket for the first time in three years, trapped Tristan Stubbs (9) leg before wicket.
But Aiden Markram, who has been under pressure to get runs, will resume on Friday on 47 alongside captain Temba Bavuma, who is four not out.
Both teams elected to play all-seam bowling attacks on a bowler-friendly wicket and it was the home side's change pair of Dane Paterson and Corbin Bosch who did the damage after South Africa won the toss and put the visitors into bat.
Paterson took 5-61 in 16 overs while Bosch had a dream start on debut at his home ground as he became the 25th cricketer to take a wicket with his first ball in test cricket, dismissing Pakistan captain Shan Masood in the 14th over.
South Africa's Corbin Bosch took a wicket with his first ball in Test cricket to dismiss Shan Masood (AP PHOTO)
Bosch, who finished with 4-63 off 15 overs, had been drafted into the South Africa side after a raft of injuries to their regular fast bowlers, had Masood caught at third slip by Marco Jansen with his opening delivery, before Paterson took five wickets in an innings for a second successive test.
The 35-year-old, also grabbing a rare test opportunity because of the injury toll, took 5-71 in Sri Lanka's first innings last month as South Africa beat them by 109 runs in Gqeberha and continued his form on a hot day in Pretoria.
Paterson had Saim Ayub caught behind for 14, followed by Babar Azam, back in the side after being dropped during Pakistan's last test series against England, for only four runs as pushed at a ball outside the off stump.
Pakistan's Khurram Shahzad celebrates after dismissing South Africa's Ryan Rickelton (AP PHOTO)
After lunch, Paterson ended a promising fightback as Pakistan put on 81 runs for the fifth wicket, dismissing Kamran Ghulam for 54 off 71 balls. Ghulam came down the wicket to the bowler, was cramped up by a short ball and top edged high into the sky to be caught by Rabada.
Paterson then dismissed Mohammad Rizwan and brought up his five wicket haul by dismissing Salman Ali Agha.
The test is the first of a two-match series, with the second at Newlands in Cape Town, starting on January 3.