Pakistan spinners Yasir Shah and Nauman Ali took five wickets between them to restrict South Africa to 220 all out, but the home side faltered in reply to close on 33 for four on day one of a fast-moving first test in Karachi on Wednesday (NZ time).
Azhar Ali and Fawad Alam were both not out on 5 and will resume the second morning on a wicket already producing both turn and variable bounce, suggesting the visitors' modest first innings score could be par.
In a major blow for the home side, captain Babar Azam (7) was trapped leg before wicket by spinner Keshav Maharaj just before the close of play.
South African fast bowler Kagiso Rabada (2/8) removed both Pakistan opening batsmen when he bowled Abid Ali (4) and then had debutant Imran Butt (9) caught at short leg from a vicious rising delivery.
Anrich Nortje then grabbed the wicket of Shaheen Shah Afridi (0) with a full delivery, only the fourth ball the hapless nightwatchman had faced.
South Africa were in many ways the architects of their own downfall with the bat, however, having won the toss in their first test in Pakistan since 2007.
They had two run outs in their top six, while captain Quinton de Kock (15) gave his wicket away with a wild swing across the line off left-arm spinner Nauman (2/38), who is playing in his first test at the age of 34.
Opener Dean Elgar (58) was the top scorer and looked in control until he drove at a wide delivery from Nauman and was caught at slip.
Rassie van der Dussen and Temba Bavuma were both run out on 17, while Yasir (3/54) picked up the key scalp of Faf du Plessis (23), who edged the ball to wicketkeeper Mohammad Rizwan.
Babar is captaining Pakistan in the test format for the first time having missed their recent series defeat in New Zealand with a thumb injury.
South Africa had initially included Tabraiz Shamsi as a third spinner in their line-up but he suffered lower back pain in the warm-up and was replaced by seamer Lungi Ngidi.
South Africa will play two tests and three Twenty20 Internationals on their tour, their first in Pakistan since a militant attack on the Sri Lanka team bus in Lahore in 2009 in which six policemen and two civilians were killed.
Reuters