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.
|Black Caps include Patel for Sri Lanka Tests|
|Maidana: River want Real Madrid clash|
|Cowboys top Eagles in OT behind stellar Cooper display|
|AC Milan evaluating Fabregas signing – Leonardo|
|WATCH: Steelers´ chance at game-tying field goal slips away|
|Hayne will plead not guilty to charges, says lawyer|
|Boca boss Schelotto: The only thing I feel is sadness|
|Cardinals´ Fitzgerald makes NFL history with most receptions for one team|
|River Plate´s Copa Libertadores star Gonzalo Martinez confirms January departure|
|Klopp: I was never worried about Salah´s form|
|Packers QB Rodgers sets NFL record for most passes without an interception|
|World Cup bulking hampered Man United form – Lukaku|
|Leonardo rules out Ibrahimovic Milan return|
|Warriors´ Green to return against Timberwolves|
|I feel for him… we´ll make it work – Butler responds to Embiid´s frustration|
|Torino draw no missed opportunity for misfiring AC Milan, claims Gattuso|
|We´ll always be linked together forever - Wade reflects on playing with James before final match-up|
|O´Sullivan wins record seventh UK title|
|Chiefs secure playoff berth, Saints win NFC South|
|River Plate 3 Boca Juniors 1 (aet, 5-3 agg): Quintero and Martinez clinch Libertadores title in extr|
|WATCH: Chiefs QB Mahomes throws no-look pass|
|Dolphins defeat Patriots on miraculous final play|
|Kizzire eagle snatches QBE Shootout victory|
|AC Milan 0 Torino 0: Donnarumma shines, Cutrone misses late chance|
|Back to the drawing board for West Indies - Chase|
|Copa Libertadores: Messi and Griezmann among stars in Madrid for River-Boca Superclasico|
|Brady sets NFL record for most career TD passes|
|Copa Libertadores: Tevez named on Boca bench for Superclasico final|
|Premier League needs VAR, right now! - Benitez fumes over Dean´s decisions|
|McCall expects Itoje to fit for the Six Nations|
|Solari salutes Real Madrid character after ´ugly´ Huesca win|
|Berbatov defends under-fire Lukaku|
|Sarries crush Blues to maintain unbeaten start|
|Newcastle United 1 Wolves 2: Doherty punishes Yedlin red with late winner|
|Deeney jokes he´ll ´smash´ former Watford star Richarlison|
|Huesca 0 Real Madrid 1: Bale ends drought as Solari´s men edge to victory|
|Ponting: Umpires not looking at no-balls|
|Bale ends longest LaLiga goal drought|
|Porter backs Brees for MVP, Saints for Super Bowl|
|Verstappen eyeing 2019 title fight|
|Wall ´shouldn´t have played´ against Cavaliers after scoring just one point|
|Hazard: Man City the best team in the Premier League despite Chelsea win|
|LeBron explains why he gave a Grizzlies employee his game-worn shoes|
|Bangladesh cruise to ODI victory as seamers punish Windies|
|Football will win over violence, claims CONMEBOL president|
|Alcorcon support Reus Deportiu over unpaid players|
|Saponara explains cheeky celebration after last-gasp leveller|
|Godin and Filipe Luis return to Atletico training|
|Kick It Out condemns alleged racist abuse of Sterling|
|Emotional Oosthuizen clinches South African Open title|
|The Sunday Seven - 7 Key Opta facts for NFL Week 14|
|Martino salutes Atlanta´s grand plan|
|India´s tail must show greater application - Bangar|
|Mourinho: Diogo Dalot can be new Gary Neville|
|Sterling hits out at media coverage of black players|
|Lyon roars with defiance as Australia aim for unlikely victory|
|Bulls coach Boylen: Hooked starters ´embarrassing´ in record loss|
|Martinez pays tribute to Martino, Almiron after MLS Cup glory|
|LeBron: Final Wade matchup will be bittersweet|
|Alvarez-Kovalev rematch set for February 2|
|Newcastle Jets 2 Brisbane Roar 0: Sheppard, Jair score first A-League goals|
|India close in on victory in first Test|
|LeBron flirts with triple-double as Lakers down Grizzlies|
|Lomachenko unifies WBO, WBA titles with win over Pedraza|
|Joshua wants Wilder and Fury fights – Hearn|
|Mavericks rookie Doncic leads impressive fourth-quarter surge to beat Rockets|
|Martinez named MLS Cup MVP|
|Oklahoma´s Murray wins the Heisman Trophy|
|Atlanta United 2 Portland Timbers 0: Martinez scores again as Martino´s men win MLS Cup|
|Sarri to use Hazard as centre forward again|