Pakistan, fighting to save the second Test against South Africa, were 4-198 at lunch on the fourth day in Dubai on Saturday.
Skipper Misbah-ul Haq was unbeaten on 60 with Asad Shafiq not out 67 at the break after coming together on Friday with Pakistan heading for defeat at 4-70.
The pair have put on 128 for the fifth wicket, but Pakistan still need 220 runs to avoid an innings defeat and keep their 1-0 lead in the two-match series.
They had added only nine runs to their overnight score of 4-132 when Shafiq, on 36, was adjudged lbw by Australian umpire Rod Tucker.
Shafiq went for a TV review to get a reprieve as the ball would have missed leg stump.
South Africa took a big 418-run lead with a mammoth 517 in reply to Pakistan’s paltry first innings of 99 all out.



