South Africa is now 4-72 in its second innings at stumps on Day 3 still trailing by 121 runs with only six wickets remaining and two days still to play with no signs of rain in the neutral country of the United Arab Emirates.
Pakistan did well on the opening day to work its way on top after South African captain Graeme Smith won the toss and elected to bat first.
Despite a terrific 118 from Hashim Amla and a fighting 57 from JP Duminy, South Africa struggled to 8-245 at stumps on Day 1 and then lost 2-4 to open the second day to be all out for 249 with Mohammad Irfan and 34-year-old debutant spinner Zulfiqar Babar taking three wickets apiece.
The 249 certainly looked below par on a slow and dry pitch at Sheikh Zayed Stadium in Abu Dhabi, and Pakistan hammered that point home not allowing South Africa's much-vaunted pace bowling attack to make any early in-roads.
Pakistan's openers put on a 135-run stand for the first wicket before Shan Masood fell for 75 midway through the second day.
That slightly opened up the door for South Africa's bowlers with Azhar Ali falling for 11 and Younis Khan for one, but captain Misbah-ul-Haq and Khurram Manzoor safely guided Pakistan to 3-263 at stumps on Day 2 with a lead already of 18 runs with seven wickets in hand.
The pair had already put on 85 runs for fourth wicket heading into the third day's play on Wednesday and Manzoor and Misbah continued where they left off.
Khurram had already recorded the first century of his international career for Pakistan and went on to make 146 with 15 boundaries before being caught by Jacques Kallis off Vernon Philander.
That brought to end his 112-run partnership with Misbah with Pakistan 4-290, but things didn’t get any easier for South Africa with Asad Shafiq settling in well making 54 before becoming part-time spinner Duminy's second wicket of the innings.
Misbah reached his century, just the fourth of his 42-match career for the 39-year-old skipper, but didn’t add to his 100 with Dale Steyn trapping him in front on an even 100 with Pakistan 6-394.
Wicket-keeper Adnan Akmal added 32 and Saeed Ajmal a handy 13 before Pakistan was eventually all out for 442 with a first innings lead over South Africa over a commanding 193.
Steyn took 3-88 for South Africa and Philander 3-84 with Duminy claiming 2-68 and Morne Morkel 1-35 from 23 overs. Robin Peterson (0-111 from 27 overs) and Kallis (0-44 from 13) went wicket-less for the Proteas.
South Africa almost had the entire final session on Day 3 to see out with the goal to try and limit the damage and rattle off as much of the 193-run deficit as possible.
Openers Smith and Alviro Petersen made a solid start lasting almost 11 overs and putting on 38 before Petersen was out for 17 when caught behind by Adnan Akmal of the giant left-armer Mohammad Irfan.
South Africa was then 1-38 and soon after 2-57 with Smith stumped by Akmal off Ajmal for 32 before Kallis made a rare duck when trapped LBW by left-arm paceman Junaid Khan to see the Proteas in desperate trouble at 3-58.
Pakistan then made one more breakthrough in the final over of the day, and Zulfiqar Babar's first of the innings, when first innings centurion Amla was caught behind for 10.
South Africa is now 4-72 at stumps with AB de Villiers not out on 10 and Steyn yet to score after facing the last five deliveries of the day.
With two days of the Test remaining, the Proteas have a big task firstly to just make Pakistan bat again still trailing by 121 runs with only six second innings wickets in hand.