South Africa left-arm spinner Keshav Maharaj took two wickets in successive overs to leave Pakistan struggling at 63-3 at lunch on the opening day of the second Test in Rawalpindi on Thursday.
At the break, skipper Babar Azam was unbeaten on 24 with Fawad Alam on 16 not out on a flat, brownish Rawalpindi Cricket Stadium pitch.
Pakistan, who won the toss and batted, reached 21 without loss before throwing away three wickets for one run in the space of 23 balls.
Maharaj, brought into the attack in just the ninth over, had opener Imran Butt caught behind for 15 and then trapped senior batsman Azhar Ali leg-before for nought in his next over.
Paceman Anrich Nortje then produced a sharp rising delivery to Abid Ali (six) whose fended push was caught smartly at short-leg by Aiden Markram.
Azam looked in better touch after managing just seven and 30 in the first Test, having so far hit four boundaries.
Alam, who scored a fighting hundred in Karachi, was sedate and cautious with two boundaries so far.
Pakistan lead the two-match series 1-0 after winning the first Test in Karachi by seven wickets.
The hosts have picked the same 11 that won the first Test, while the South Africans have brought in allrounder Wiaan Mulder and left out Lungi Ngidi.