Pakistan 99 (36.4 overs) & 2-2 (1.5 overs)
South Africa 517 (163.1 overs)
Pakistan wrapped up the South Africa innings with six wickets in the opening session, but were in disarray after losing two wickets in 11 balls as they began their second innings.
The Proteas, who built up a lead through a huge partnership between Graeme Smith and AB de Villiers, found going much harder on day three.
De Villiers was beaten by Mohammed Irfan on 164, edging to slip, while Smith became another of spinner Saeed Ajmal's victims, adding only seven more runs on day three to end on 234.
Thereafter, there was little more offered with the bat. It was perhaps telling that apart from the two centurions, no batsman in this Test has yet managed to pass 30 in Dubai.
Irfan bowled beautifully, and might have deserved more than his three wickets—but he was withdrawn from the attack after a third violation for running down the pitch.
That left Ajmal to mop up the tail—he was furious when an edge didn't go his way against Morne Morkel, and found that Pakistan had no further reviews—but still ended with figures of 6-151.
It meant a two-over spell before lunch, and South Africa struck immediately.
Dale Steyn had Shan Masood lbw to the fourth ball of the innings, with a Pakistan review of the decision proving fruitless.
And Vernon Philander followed it up by drawing an edge from Khurram Manzoor, held expertly by Jacques Kallis in the slips.
It wrapped up a pair for Manzoor in the match, and points to a devastating defeat for Pakistan if no batsmen can fend off South Africa.