Saeed Anwar made a superb 118 for Pakistan before becoming one of fast bowler Pollock's victims in an inspired spell. Pollock's burst came after it had been announced that star paceman Allan Donald would not be able to bowl again in the match because of a buttock strain.
Donald had made a crucial breakthrough when he had Aamir Sohail caught behind for 36 after Aamir and Saeed had put on 101 for the first wicket.
When Donald limped off the field soon afterwards it seemed Pakistan were on the way to a winning total. The stand between Saeed and Aamir was the first century opening partnership against South Africa in a Test match since the country's readmission to international cricket in 1991.
Saeed, who had made only 45 runs in eight previous Test innings against South Africa, was in superb form, reaching his half-century off 80 balls with nine fours and going to his fifth Test hundred off 179 balls with 16 boundaries.
Pakistan, however, suffered a double blow when Ijaz Ahmed was bowled by Fanie De Villiers and Mohammad Wasim run out in a mix-up in the same over. The quick fall of wickets was the cue for Pollock to start his rampage by having Yousaf Youhana caught behind. He followed it by having Moin Khan trapped lbw before Saeed swung across the line, also to fall leg before.
Azhar Mahmood, after two successive centuries, was caught behind when he flashed at a bouncer and Waqar Younis was caught at mid-on.