After conceding a huge 418-run lead, Pakistan lost both openers, Shan Masood (nought) and Khurram Manzoor for his second duck, in a disastrous start to their second innings.
Steyn removed Masood with a sharp incoming delivery, trapphim lbw, while Manzoor was caught in the slip off Vernon Philander's fifth ball.
Manzoor, who hit 146 in Pakistan's seven-wicket win in the first Test in Abu Dhabi, got a pair.
At the break, Azhar Ali was unbeaten on two after an extended two-and-a-half hour session due to Friday prayers.
South Africa had resumed their first innings on 460-4 but managed to add just 57 as off-spinner Saeed Ajmal warpped up the innings with 6-151.
De Villiers was the first to go as he slashed at an outgoing delivery and was smartly caught by wicket-keeper Adnan Akmal.
De Villiers hit 17 fours and a six during a commanding 376-minute innings and completed an all-time South African fifth wicket record partnership of 338 with Smith.
But unlike Akmal's dropped catch off De Villiers on the very first ball on Thursday, this didn't prove costly as Smith was caught in the slip by Younis Khan in Ajmal's next over.
Smith's superb knock lasted 10 hours and 32 minutes during which he dominated Pakistan's bowling, hitting 16 boundaries and facing 388 balls.
With that catch, Younis beat Javed Miandad's record of most Test catches of 93. It took him 86 Tests, 38 fewer than his illustrious countryman.
Pakistan suffered another jolt when Irfan was removed from the bowling attack by Australian umpire Rod Tucker for running into the danger zone after a second warning.
Ajmal removed the tail by dismissing the last three wickets for his ninth five-wicket haul in Tests.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
