The loss of both openers just before the close of play meant Pakistan conceded most of the ground regained by their bowlers on day two of the second Test against New Zealand.
Shan Masood and Taufeeq Umar failed to negotiate the last 19 overs to leave their side 369 runs adrift of the Black Caps' total of 403 at stumps in Dubai.
Leg-spinner Ish Sodhi spun one through the defences of Masood and Umar was stumped after over-reaching while trying to smother off-spinner Mark Craig as Pakistan slipped to 34 for two.
It means the designated hosts, who have won their last three Tests convincingly and hold a 1-0 lead in the three-match series, have a major rebuilding job ahead of them tomorrow after fighting back with the ball today.
Resuming on 243 for three, New Zealand added just two before losing both overnight batsmen as Corey Anderson and century-maker Tom Latham, who failed to add to his 137, departed within the space of the opening three overs.
Anderson looped a delivery off Eshan Adil to cover while Latham was undone by a beauty from Rahat Ali which nicked the outside edge and was pouched by wicketkeeper Sarfraz Ahmed.
Once the seamers had made the breakthrough spin took over and, with James Neesham mis-timing leg-spinner Yasir Shah and clipping straight to midwicket, the score crawled to 295 for six at lunch.
Progress remained slow after the interval as BJ Watling and Craig brought up a half-century partnership in 142 balls and with frustration growing captain Misbah-ul-Haq turned to Azhar Ali.
The move paid off as the part-time tweaker struck with his third ball as Watling, on 39, cut him loosely to backward point to give Azhar only his second Test wicket in four years.
In the next over a review could not save Craig, who was earlier handed two lives during his 110-ball 43, after he missed a pull off Babar Zulfiqar and departed leg before.
Tim Southee was bowled trying to slog-sweep Babar, who finished off the innings with his fourth wicket by dismissing Trent Boult to leave Sodhi stranded on 32.