At lunch Smith was unbeaten on 97 before he was departed after the lunch and Brad Haddin was 13 not out.
Pakistan needed five more wickets to take the series 2-0. But even a draw will give them their first series victory against Australia for 20 years after they won the first Test in Dubai by 221 runs.
Australia must survive for another 57 overs to salvage a draw or score 365 more runs for a highly unlikely win.
Smith added an invaluable 107 for the fifth wicket with Mitchell Marsh, who fell after scoring 47.
He batted resolutely, using his feet against the spinners during his 202-ball knock and hitting a dozen boundaries.
Smith reached his eighth Test fifty with two boundaries off spinner Zulfiqar Babar, who failed to add to his three wickets on Sunday.
Marsh, who top-scored with 87 in Australia’s first innings, played Pakistan’s pace-cum spin attack confidently and he and Smith added 55 runs in the first hour.
But Mohammad Hafeez provided the breakthrough when he had Marsh caught by Asad Shafiq off an uppish flick. His 130-ball innings included six boundaries.
Babar has so far been the pick of the bowlers in this innings with 3-116.