Paceman Morne Morkel took 5-54 to put South Africa in command after day three of the first Test against Pakistan in Dubai.
Pakistan slumped from an overnight 144-2 to 248 all out in their first innings, with Morkel and off-spinner Johan Botha sharing eight wickets.
The Proteas reached 139-2 in their second innings by the close to increase their overall advantage to 271.
Azhar Ali and Younus Khan extended their third-wicket stand to 65 during the first hour of the day.
Former skipper Younus, back in favour after a 16-month absence from the Test arena, chipped a sharp catch to AB de Villiers at midwicket for 35 to give Botha the opening breakthrough of the day.
Botha (3-61) struck twice more before lunch, accounting for Misbah-ul-Haq (9) and Umar Akmal (4) to leave Pakistan struggling on 214-5 at the interval.
The afternoon session belonged to Morkel as, after Dale Steyn (1-58) removed Adnan Akmal (10), he extracted alarming bounce from a lifeless pitch to take the final four wickets in the space of 15 deliveries.
Abdur Rehman (1) was held by De Villiers at slip, Ali (56) popped a catch to Hashim Amla at short-leg and Wahab Riaz (5) and Saeed Ajmal (2) both edged to wicketkeeper Mark Boucher.
South Africa, holding a first-innings lead of 132, more than doubled their advantage in the final 48 overs of the day.
Openers Graeme Smith (34) and Alviro Petersen (26) fell lbw to spinners Rehman (1-37) and Ajmal (1-31) respectively either side of tea.
But Amla (44no) and Jacques Kallis (32no) stood firm through to stumps with an unbroken third-wicket alliance of 63.