South Africa remaining on course to share the series with an emphatic victory over Pakistan was overshadowed by a being penalised five penalty runs for ball tampering.
The Proteas took a first-innings lead of 418, but in the process of reducing their opponents to 132 for four at stumps on day three in Dubai courted controversy.
Two overs after tea, with Pakistan 67 for three, the umpires called skipper Graeme Smith over for a chat, changed the ball and docked Smith’s side five runs following TV footage of a South Africa player rubbing the original ball on the zipper of his trouser pocket.
With the Proteas earlier resuming on 460 for four, Smith had added seven to his overnight 227 and AB de Villiers as many to his 157. Their enormous stand was worth 338.
De Villiers was fifth out, caught behind off Mohammad Irfan, as the last six wickets fell for 45 runs with Saeed Ajmal striking four times today, including having Smith held at slip, for figures of 6-151.
Pakistan’s plight worsened when openers Shan Mansood and Khurram Manzoor were dismissed by Dale Steyn and Vernon Philander respectively in the two overs before lunch.
Azhar Ali and Younus Khan dug in until Azhar was lbw to JP Duminy and Imran Tahir bowled Younus for 36 with the changed ball.
Captain Misbah-ul-Haq and Asad Shafiq responded by adding an unbroken 52 to reach 42 and 28 respectively.