Graeme Smith was appearing in his 100th Test as captain, on his 32nd birthday, but he had a day to forget as Pakistan cut through the home team's batting by snatching six wickets in the final session.
The visitors then ended the day on six without loss in reply.
There was a cake in the shape of '100' and a rousing rendition of 'happy birthday' from the crowd at tea. However, it was Pakistan who were doing most of the celebrating when stumps were drawn.
Having won the toss and chosen to bat on a track that provided plenty of early encouragement to the bowlers, the home team will be disappointed that all of their top six batsmen got starts without going on to make big scores.
"Our total showed there was always something in the wicket. It never feels flat when you are out there," South Africa batsman Faf du Plessis told a news conference.
"We were looking for about 320, that would have been par. We thought 350 would be a really excellent score."
South Africa were pegged back first by the excellent seam bowling of Junaid Khan and later on by off-spinner Mohammad Hafeez who picked up four for 16.
After a cautious start the hosts edged their way to 46 before a double strike pegged them back.
Alviro Petersen was caught for 20 at third slip by Hafeez off Junaid and four balls later opener Smith edged paceman Umar Gul to wicketkeeper Sarfraz Ahmed on 24.
A quickfire 79-run stand for the third wicket by Jacques Kallis and Hashim Amla steadied the ship before the heavyweight duo were removed by two excellent catches.
Kallis reached his 58th Test half-century before he was brilliantly snapped up by Asad Shafiq in the deep on 50 while Amla was taken in the gully by Azhar Ali off Younus Khan for 37.
Du Plessis and AB de Villiers survived appeals for catches behind that Pakistan reviewed after they were given not-out by New Zealand umpire Billy Bowden.
De Villiers (31) was just getting into his stride when he finally did edge behind to Sarfraz off Hafeez in the off-spinner's first over.
With much of the juice having been drained from the pitch by the hot sun, Pakistan turned to spin from either end and were getting enough turn and bounce to slow down the run-rate.
That was until Dean Elgar, his confidence high after a maiden test century last month against New Zealand, launched a counter-attack that included a massive six off Ajmal.
Junaid was then brought back into the attack and in his first over he removed Du Plessis for 41.
A well pitched-up delivery kept a little low and although the South African got plenty of bat on it with his forward defensive, the ball went back on to the stumps and dislodged a bail to make the score 232 for six.
Robin Peterson was next to go for a duck when he left a ball from Hafeez that turned and nudged the top of off stump.
Elgar's promising knock came to an end on 27 when he edged Hafeez down the leg side to Sarfraz.
Vernon Philander was then needlessly run-out for one attempting a second run before Morne Morkel was out for a duck, becoming Hafeez's fourth victim.
Du Plessis refuted suggestions South Africa had suffered a lack of concentration because of Smith's milestone.
"Graeme told us before play this day was not about him and that we must think about nothing except achieving our goals," he said. "And when he opens his mouth you listen."
Hafeez praised the qualities of Pakistan skipper Misbah-ul-Haq.
"Misbah is a great character and he always gives confidence to the players and he is turning out to be one of the best Pakistan test captains," said the spinner.
"Credit must also go to all the bowlers because they restricted the South Africans from scoring and that frustration allowed us to pick up wickets at the right time."
- Sports & Recreation
- Mohammad Hafeez