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.
|Slovenia sack Kavcic as head coach|
|Morgan and Rashid star as England win rain-reduced ODI in Sri Lanka|
|Romagnoli aims to make Gattuso proud in Milan derby|
|Naldo signs Schalke extension|
|Bills to start quarterback Anderson against Colts with Allen out|
|O´Sullivan makes 147 at ´hellhole´|
|Barcelona know when captain Messi is angry – Abidal|
|Bertens loss hands Pliskova last WTA Finals berth|
|Liverpool star Mane undergoes hand surgery|
|F1 Raceweek: Happy hunting ground for title-chasing Hamilton - US GP in numbers|
|Canelo signs record-breaking DAZN deal|
|England hit by another Vunipola injury absence|
|Gruden: Oakland Raiders ´aren´t tanking´|
|Chiesa focused and happy at Fiorentina|
|We´ll see what´s possible - Henry not limiting Monaco´s ambitions|
|Wembley sale off after Khan offer withdrawn|
|Football needs people like Arsene - Pires keen for Wenger return|
|Abbas five-for torments woeful Australia as Pakistan take control|
|Henry: Wenger and Guardiola inspirations for my coaching career|
|Pires backs Henry and Vieira for Ligue 1 success|
|Bolt rejects Valletta offer|
|Wenger ready for January return to management – but where?|
|NBA 2018-19: The LeBron James effect on teams he has joined|
|Svitolina qualifies for WTA Finals after Pliskova loses|
|Genoa will sell ´superstar´ Piatek, admits president|
|Moutinho targets European qualification with Wolves|
|Embiid: 76ers-Celtics isn´t a rivalry, they always kick our a**|
|Vinicius ´calm´ as he waits for Real Madrid chance|
|Nothing else to say - Ramos posts clip of supposed Sterling stamp|
|Chiellini joins Mind the Gap campaign to help players prepare for retirement|
|Injured Kusal Perera replaced by Kusal Mendis in Sri Lanka squad|
|Big names return for Scotland´s November Tests|
|Essien tells Loftus-Cheek to stay and fight for Chelsea chance|
|Nainggolan relishing challenge of first Milan derby|
|Curry: Slap me if I tire of championship celebrations|
|Sevilla don´t fear Messi or Barca – Kjaer|
|Low: Dropped Muller is still very important for Germany|
|Hayward put ´dark memories´ behind him with Celtics return|
|I hope I´m in Klopp´s good books! - Koeman jokes after resting Wijnaldum|
|Rested Fellaini should be fit for Manchester United, says Martinez|
|France´s mentality must be right - Lloris|
|Bellinger seals dramatic win as Dodgers level up NLCS|
|Curry, Durant lead Warriors past Thunder|
|Kjaer surprised by LaLiga-leading Sevilla as Machin´s men remain grounded|
|A-League preview: Honda the big arrival as fascinating season awaits|
|Mexico 0 Chile 1: Sanchez helps La Roja to late win|
|Celtics too good for 76ers in NBA opener|
|United States 1 Peru 1: Flores salvages late draw for visitors|
|Martinez not worried about Belgium depth|
|Red Sox move ahead of Astros in ALCS|
|Depay ´a joy to watch´, says Koeman|
|Timberwolves owner looking to trade Butler, backs Thibodeau|
|Shepard says Giants have ´total faith´ in Manning|
|Hazard is out of this world – De Ligt enjoys Belgium test|
|Tite: Brazil were better than Argentina|
|Foley eyes World Cup after re-signing with Wallabies, Waratahs|
|Low slams decisive France penalty call|
|I fined him for his goal at Old Trafford! Giggs delighted for Wales hero Wilson|
|Matuidi lauds Deschamps´ tactical nous after Germany win|
|Scaloni excited by Argentina despite Brazil loss|
|Tsonga back in business, Dzumhur dumped out in Moscow|
|Germany suffer six defeats in a year for first time|
|Many clubs have asked about Piatek - agent|
|Bartomeu: Barca open to defensive reinforcements after Vermaelen injury|
|Bonn spoil PAOK´s landmark European game|
|Konta conquers Mertens in Moscow|
|Republic of Ireland 0 Wales 1: Wilson stunner moves Giggs´ side top|
|France 2 Germany 1: Griezmann delivers Low blow as Les Bleus reign in Paris|
|Belgium 1 Netherlands 1: Groeneveld cancels out Mertens strike|
|Argentina 0 Brazil 1: Miranda heads late winner after rivalry fails to ignite|