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.
|´Fatigued´ Embiid has a lot on his shoulders - Brown|
|Crespo agrees to take charge at Banfield|
|Westbrook on Murray scuffle: He was in my way|
|Liverpool v Manchester United: Van Dijk the rock on which Klopp can build a title triumph|
|Marcelo ´never´ considered Madrid exit amid Juventus links|
|Liverpool v Manchester United: Resurgent Rashford now a leader for Mourinho|
|Injury-plagued Nuggets beat Thunder to hold Western Conference lead|
|Southee takes five as Sri Lanka recover in Wellington|
|Kings troll Curry by playing clips of moon landing|
|Guardiola: Premier League title race similar to Barca-Madrid battles|
|Ovechkin joins rare NHL club with second straight hat-trick|
|Liverpool can´t be judged just on trophies – Klopp responds to Mourinho|
|Athletics´ Chapman undergoes procedure on left shoulder|
|Marcelo: Real Madrid miss Ronaldo|
|Ronaldo right about Juventus team spirit – Allegri|
|Klopp: I´m not the pope of football tactics|
|Stade beat Ospreys on emotional Chauvin tribute night|
|Ligue 1 survival bid a marathon not a sprint for Monaco, as club appoints distance runner|
|Vertonghen eyeing Spurs future beyond 2020|
|De Bruyne injuries could be a blessing for City, says Guardiola|
|Emery prepared to face Arsenal´s centre-back crisis|
|Ulster complete Scarlets double, Exeter gain Gloucester revenge|
|Sheffield United 1 West Brom 2: Baggies comeback boosts automatic promotion push|
|Del Potro back on court following knee injury|
|Canelo v Fielding: Rocky ready to write his own fairytale in New York|
|Boca part company with Schelotto after Copa Libertadores loss to River|
|Canelo v Fielding: Tale of the tape|
|Juventus defender Cancelo has knee surgery|
|Canelo v Fielding: Alvarez and Rocky make weight in New York|
|Spalletti does not fear another mid-season crisis at Inter|
|Salah headlines CAF Player of the Year shortlist as Koulibaly misses out|
|Beckham Jr. out of Titans clash|
|Lipsky hits the front at Leopard Creek|
|Pederson coy over Wentz back injury|
|Liverpool ´not really likely´ to be active in January window, reveals Klopp|
|Always on the move and unpredictable - Pavard reveals surprising choice over toughest opponent|
|We need to get back to respect - Lampard alarmed by hate in football|
|Giles returns to England to replace Strauss as director|
|Hansen has no issue with Milner-Skudder Toulon switch|
|Juventus to rest Ronaldo after Torino showdown|
|Titmus strikes gold again as world records tumble in Hangzhou|
|Malinga to captain Sri Lanka in New Zealand|
|Rivaldo would like ´excellent´ Isco at Barcelona|
|United a long way from Mourinho´s vision|
|´Klopp denies an answer!´ - Liverpool boss dismisses questions about ´world-class´ Pogba|
|Returning Nowitzki ´so tired´ after making NBA history|
|Aguero and De Bruyne in contention for Manchester City v Everton|
|Simeone has no plans to cash in on Costa|
|Canelo v Fielding: Alvarez´s greatest nights|
|Fabregas: Chelsea being unfairly scapegoated over racism allegations|
|Crisis? What crisis? Klopp focuses on defensive solutions for United clash|
|Hope cannot inspire Windies as Bangladesh cruise to series win|
|Benitez picks up Premier League Manager of the Month award|
|Chavez, Marquez and Canelo - Mexico´s greatest multi-weight world champions|
|Bale set to miss Real Madrid v Rayo Vallecano|
|Robben out until January as Bayern look to avoid serious injury|
|Milan avoid UEFA ban in FFP punishments.|
|Mourinho compares Liverpool to ´an amazing house´ but insists trophies matter|
|Brisbane Roar 2 Melbourne Victory 4: Muscat´s men hit A-League summit|
|Bumrah confident second Test is ´in the balance´ after India recovery|
|Isco gesture was for a corner or foul, claims Solari|
|Harris leads Australia into ascendancy on day one|
|ATP announces candidates to host future Finals|
|Ronaldo: Juventus fans refuse to lose to Torino|
|Hero Rivers feared he had cost Chargers in KC|
|Williams would welcome Llorente back to Athletic Bilbao|
|Liverpool v Manchester United: Minding the gap|
|Milan elimination unjust, fumes Leonardo|
|Paul hails ´sick´ Harden after record-breaking display|
|Liverpool v Manchester United: Salah, Mane and Firmino v Rashford, Martial and Lukaku in Opta number|