Pakistan's spinners scythed through Australia's top order in the second innings to get them close to victory in the first Test after twin centuries from Younus Khan and youngster Ajmal Shehzad helped the hosts set an improbable target.
Left-arm spinner Zulfiqar Babar and debutant leg-spinner Yasir Shah took two wickets each as Australia crawled to 59 for four wickets at the close of play, after being set 438 to win.
David Warner (29), who had scored 133 in the first innings, and Alex Doolan (zero) fell in the same over to Babar while Shah took out Australia captain Michael Clarke (three) and nightwatchman Nathan Lyon (zero) -- also in one over.
Chris Rogers (23), the other opener, was given out caught behind on 14 against Babar but managed to overturn the decision on referral and remained unbeaten. Steve Smith was the other not out batsman on three.
Younus, who had scored 106 in the first innings, remained unbeaten on 103 in the second for his 26th Test hundred to overtake Inzamam-ul-Haq as the most prolific century-getter by a Pakistan batsman.
He also became the first batsman in 40 years, since New Zealander Glenn Turner in 1974, to hit twin centuries in a Test match against Australia.
Pakistan declared on 286 for two and as soon as former captain Younus crossed his mark, ending the ordeal for Australia's bowlers who looked toothless.
Debutant spinner Steve O'Keefe took both wickets to fall.
The 22-year-old opener Shehzad (131) also completed his second Test century and added 168 for the second wicket with Younus, who hit six fours and two sixes in his knock.
With the pitch at the Dubai International Cricket Stadium offering assistance to the spinners, scoring runs freely proved a tough ask for the Pakistan batsmen in the first session.
Shehzad and Azhar Ali (30) added 71 in their opening stand before the latter edged O'Keefe to wicketkeeper Brad Haddin, who held on to a smart catch.
Right-hander Shehzad, playing his sixth Test match, survived a fiery spell from left-arm paceman Mitchell Johnson in the first session, during which he was hit on the rib cage by a sharp, rising delivery.
Shehzad, who hit 10 boundaries and four sixes in his knock, was hardly troubled otherwise and reached his century with a sublime straight-driven four off fast bowler Peter Siddle.
Pakistan upped their tempo as Shehzad looked for quick runs after going past his hundred and hit Siddle for a boundary and two sixes in consecutive deliveries during an over that cost the bowler 20 runs.
Shehzad was the only other Pakistan batsman to be dismissed on Saturday when he was out leg before to O'Keefe.
Cuttack to host India-Sri Lanka One-Day series opener
Review: Shah Rukh can't lift Happy New Year high enough
Flood-affected J&K not ready for polls: National Conference
EPL: West Ham stun champions Manchester City
Make in India: 6 desi submarines worth Rs 50,000 cr to be built