South Africa took a vice-like grip on the first test after Morne Morkel and Johan Botha skittled Pakistan for 248 on the third day at the Dubai International Cricket Stadium.
The visitors will take a commanding 271-run lead into the fourth day after reaching 139 for two in their second innings.
Off-spinner Botha dismantled Pakistan's middle order picking up three quick wickets and Morkel completed a bad day for the designated hosts as he grabbed five for 54.
Pakistan lost their last five wickets for the addition of just 28 runs and face an uphill task to save the test.
South Africa lost Alviro Petersen and Graeme Smith before an unbroken third-wicket stand of 63 between Hasim Amla (44 not out) and Jacques Kallis (32 not out) guided them to a strong position at the close of play.