Mohammad Abbas took three quick wickets in a devastating burst to put Pakistan on course to win the first Test in Dubai, but Usman Khawaja's unbeaten half-century gave Australia hope on day four.
Abbas (3-26) struck three times without conceding a run after Pakistan declared on 181/6, Imam-ul-Haq top-scoring with 48 as the tourists were set a highly unlikely 462 to win.
Khawaja and Aaron Finch combined for a century stand in the first innings before an almighty collapse left Australia deep in the mire and there was a sense of deja vu on Wednesday.
The openers put on 87 in a positive partnership, but Abbas – who took 4/29 when Australia folded on day three – dismissed Finch (49) before removing brothers Shaun and Mitchell Marsh without scoring.
Khawaja (50 not out) and debutant Travis Head (34no) saw Australia through to 136/3 at stumps, needing a heroic final-day rearguard effort to avoid falling behind in the two-match series.
Australia were in desperate need of early wickets on the penultimate day, but Haris Sohail and Imam added 65 for the fourth wicket after Pakistan resumed on 45/3.
Sohail used his feet superbly to come down the track and hit Jon Holland (3-83) for a couple of sixes and Imam ticked along patiently to keep the lead building.
Holland got the breakthrough when Imam gave him the charge but offered a simple caught and bowled, then Marnus Labuschagne snared Haris lbw in the next over to leave Pakistan 110/5.
Asad Shafiq (41) and Babar Azam (28 not out) added 71 as the Australia bowlers toiled in the heat before the former was taken by Mitchell Marsh with a big heave off Nathan Lyon (2-58), who moved level with Brett Lee's tally of 310 Test wickets.
That prompted the declaration from Sarfraz Ahmed, who gave off spinner Mohammad Hafeez the new ball along with Abbas, but soon turn to Yasir Shah.
Yasir and Bilal Asif, who took six wickets on debut in the first innings, were unable to get the breakthrough as Khawaja and Finch played with assurance, putting away stray deliveries and displaying stoic defence.
From 72 without loss at tea, Australia soon found themselves in trouble when Abbas came struck three times in the space of seven balls, Finch trudging off after unsuccessfully reviewing an lbw decision.
Shaun Marsh was caught behind nibbling at one that nipped away, and his younger brother also fell for a duck, Abbas celebrating another lbw verdict following a review after the ball struck pad before bat.
Khawaja had a slice of luck when he flashed at a delivery from Haris and Shafiq failed to hold on to a difficult one-handed chance at a wide first slip, before the left-hander brought up a second hard-earned half-century of the match, with support from Head.
22. Oktober 2018
|Wilshere would have stayed at Arsenal under Wenger|
|Mahomes stars again as Chiefs crush Bengals|
|Bolt must accept ´much less´ to join Mariners, says A-League chief|
|Klopp compares Liverpool to dog without favourite toy|
|Young leads Hawks to first win, Thunder fall in Westbrook´s return|
|Spalletti hits out at physical Milan – I had three players asking to be replaced|
|Cowboys, Ravens lose after missed kicks in final seconds|
|Hernangomez secures Nuggets´ win over Warriors with last-second block|
|Hasler returns to Manly on three-year deal|
|Sarri: Chelsea fans must respect Mourinho|
|Ronaldo learnt from Scholes – Pjanic praises Juventus star|
|CA dismisses spot-fixing claims|
|WATCH: Will Ferrell leads chants with LAFC fans|
|MLS Review: Galaxy on track for play-offs as Timbers, DC clinch spots|
|Elliott secures win at Hollywood Casino 400|
|Thunder´s Westbrook makes season debut against Kings|
|Saints beat Ravens after Tucker misses extra point|
|Rondo, Paul and Ingram banned after Lakers-Rockets fight|
|Saints QB Brees reaches another historic milestone|
|Biglia: VAR should have checked Nainggolan tackle|
|Gattuso not blaming Donnarumma for derby defeat|
|Seventh in Mexico will secure Hamilton´s fifth world title|
|Rooney fires DC United into MLS play-offs|
21. Oktober 2018
|Alonso slams ´amateur´ F1 rivals after latest crash|
|Spalletti fears lengthy Nainggolan absence|
|To the Max! Verstappen destroyed shoe fending off Hamilton|
|Icardi delight after Donnarumma error gives him another derby winner for Inter|
|Guardiola: Versatility the key for Stones|
|Vettel frustrated as mistakes continue to hamper title challenge|
|ECB refutes spot-fixing claims against England players|
|I thought we would do better - Hamilton queries Mercedes strategy|
|Inter 1 AC Milan 0: Icardi settles derby with dramatic late winner|
|Hamilton denied title party as Raikkonen wins in Austin|
|Patriots RB Michel out against Bears with gruesome knee injury|
|Kohli hails Rohit partnership after comprehensive India victory|
|Silva downplays his role after Everton super subs seal victory|
|Injured Bairstow out of final white-ball matches in Sri Lanka|
|Pliskova feeling confident after impressive start in Singapore|
|Big-hitting Imrul rescues Bangladesh in opening ODI|
|Leinster suffer late defeat at Toulouse, Newcastle snatch dramatic victory|
|Chargers pip Titans to dramatic London win|
|Everton 2 Crystal Palace 0: Substitutes Calvert-Lewin and Tosun clip Eagles´ wings|
|Thunderstorms push Andalucia Valderrama Masters into reserve day|
|Edmund masters Monfils to claim maiden singles title|
|Kohli and Rohit fire India to comprehensive ODI win|
|Manchester United didn´t play - David Luiz blasts Mourinho tactics|
|Svitolina out to silence ´haters´ in Singapore|
|Emre Can facing surgery on thyroid problem|
|Tsitsipas claims maiden ATP crown in Stockholm|
|Mariners boss Mulvey knows nothing of Bolt contract offer|
|WATCH: Vinicius Junior scores free-kick - then sees red!|
|Gronkowski ruled out of Bears clash|
|Khachanov enjoys home comforts with comprehensive Kremlin Cup win|
|Isner wants Wimbledon tie-break rule named after him|
|Hummels lauds ´outstanding´ Lewandowski|
|Liverpool´s defensive improvement no accident – Gomez|
|Pliskova overpowers defending champion Wozniacki in Singapore|
|Marquez dislocates shoulder celebrating MotoGP title|
|Henry taking positives from opening Monaco defeat|
|A-League Review: Mariners held as Bolt considers move|
|Dominant Svitolina ends Kvitova hoodoo in Singapore|
|Pereira warns Juventus to expect ´pumped up´ Manchester United|
|D´Antoni backs NBA to ´sort out´ Lakers-Rockets brawl|
|Mixed feelings for champion Marquez after Dovizioso crash|
|Bolt offered contract by Central Coast Mariners|
|Anthony accuses Rondo of spitting after Lakers-Rockets brawl|
|Martial insists he has good relationship with Mourinho|
|Bautista to replace Lorenzo at Phillip Island|
|Emery wanted Lacazette at Paris Saint-Germain|
|Wallabies centre Hodge suffers fractured ankle|