Babar Azam fell one short of a maiden Test century after a farcical Azhar Ali run out as Pakistan put themselves well on course for victory over Australia in Abu Dhabi on day three.
Azhar threw his wicket away comically for 64 at Sheikh Zayed Stadium, Mitchell Starc zipping in a throw and Paine whipping off the bails as the number three casually chatted to Asad Shafiq out of his ground thinking he had struck a boundary.
There was also agony for Babar when he was dismissed for 99, but Pakistan should have the last laugh after declaring on 400-9 to set the tourists a highly unlikely 538 to win.
Usman Khawaja's magnificent century denied Pakistan in the first Test, but he was unable to open due to a knee injury on Thursday and his replacement, Shaun Marsh, fell cheaply as Australia were reduced to 47-1 at stumps.
Sarfraz Ahmed (81) earlier made a second half-century of the match, with Nathan Lyon taking 4-135 on a gruelling day for Australia.
Lyon struck in the sixth over of the day with a flighted delivery which deceived an advancing Haris Sohail, who was stumped by Paine.
Azhar followed in bizarre fashion soon after to leave Pakistan 160-4, but Babar and Shafiq capitalised on an excellent batting surface in a stand of 75.
Shafiq was twice dropped by Marnus Labuschagne at short leg off Lyon before the all-rounder dismissed him for 44 in the afternoon session.
Babar had brought up his half-century and continued to tick along effortlessly, launching Labuschagne for six over long-off before Sarfraz did the same to Lyon straight after sweeping him to the boundary.
Peter Siddle rattled Sarfraz on the helmet, but the skipper brought up his second half-century of the match and Babar was on the brink of a first Test hundred when he was trapped leg before by Mitchell Marsh.
Babar reviewed, in hope more than expectation, but was sent on his way after hitting three sixes and another six boundaries in an excellent knock, putting on 133 for the sixth wicket with Sarfraz.
Bilal Asif smashed Labuschagne's first ball after tea for a straight six, but he and fellow spinner Yasir Shah fell in the same Lyon over, much to the frustration of Sarfraz.
Sarfraz decided it was time to deal in boundaries, but missed out on a hundred again when Labuschagne snared him leg before and declared soon after trudging off.
Stand-in opener Shaun Marsh failed for the fourth time in the series, bowled by a peach of a delivery from Mir Hamza which nipped away and struck the top of off stump.
Aaron Finch and Travis Head prevented any further damage from being done, but Pakistan have two days to take the nine wickets needed to win the series.
17 de enero 2019
|Sri Lanka hopeful over Kusal Mendis finger injury|
|Oman 3 Turkmenistan 1: Last-gasp Al-Musallami guarantees progression|
|Emery wants Cech to end career ´in a good moment´|
|Japan 2 Uzbekistan 1: Shiotani stunner seals comeback and top spot|
|Calhanoglu deal ´financially impossible´ for Leipzig|
|Not seen at Aus Open since Nadal, Djokovic and Murray in 2009 – ´Next Gen´ make move|
|Martial: Solskjaer lets me express myself|
|Djokovic sees off Tsonga to reach third round|
|Returning Cousins calls Warriors ´the most hated team in sports´|
|Halep injury ´nothing dangerous´|
|Warner picks up elbow injury in Bangladesh|
|Mkhitaryan returning to Arsenal training next week|
|Leeds United pounce for Real Madrid goalkeeper Casilla|
|Watson lights up Gabba before power cut forces abandonment|
|Superb Serena blows Bouchard away|
|Tevez, Hulk, Oscar, Lavezzi - how the CSL stars Dembele is following to China fared|
|Thiem retires from Australian Open|
|Osaka ´not telling´ when it comes to injury niggle|
|Fabinho enjoying Klopp´s management style|
|Halep battles past Kenin in Melbourne|
|Hartley to miss England´s Six Nations opener|
|Dembele departs Spurs for Guangzhou R&F|
|Nacho convinced Isco remains important to Real Madrid|
|Warriors star Curry sets NBA record|
|Raonic survives four-hour marathon against Wawrinka|
|Osaka powers through to Aus Open third round|
|Irving dominates in Celtics´ win over Raptors|
|Irving called LeBron this week to apologise|
|Ajax star De Jong wants to resolve future ´quickly´|
|Payton on Rams CB Peters: I have great respect for him|
|Rockets star Harden matches Chamberlain with historic performances|
|Nishikori survives Karlovic test in Melbourne|
|Vieira reunion felt really weird - Henry|
|´#BetAgainstUs´ - Edelman and Pats embracing underdog status|
|Van der Vaart: Isco the best player in the world|
|I haven´t seen Guardiola or Klopp do that – Lampard unhappy with Bielsa|
|Real Madrid always play to win, insists Casemiro|
|Royals pitcher Skoglund suspended for 80 games after testing positive for PEDs|
|Ronaldo and Juve celebrate Supercoppa Italiana title with Mayweather|
|We are not going to talk about Morata - Simeone reluctant to discuss striker|
|Madrid weak in Leganes loss, says Solari|
|Bologna and Banvit seal Champions League play-off spots|
16 de enero 2019
|LeBron James to miss Thunder & Rockets games but nearing practice return|
|Leganes 1 Real Madrid 0 (1-3 agg): Isco starts as Solari´s side go through despite defeat|
|NFL playoffs 2019: X-factor for each NFC team|
|Mahomes: Chiefs must not repeat mistakes against Patriots|
|Higuain´s Supercoppa benching due to virus, says Milan boss Gattuso|
|Brown fires back at Arians over ´diva´ comments|
|Stone heading home from West Indies tour with back injury|
|Shazier will continue rehab with intention of playing again|
|That´s why we signed him! Allegri hails Supercoppa match-winner Ronaldo|
|Monaco on worst home run in club´s history after Nice draw|
|Atletico Madrid 3 Girona 3 (4-4 agg): Simeone´s side out on away goals|
|Gregg Williams is Jets´ new defensive coordinator|
|Ronaldo: Supercoppa triumph just the start for Juve|
|Monaco confirm Batshuayi talks|
|You know more than me! Bielsa´s Barcelona research surprised Guardiola|
|Juventus 1 AC Milan 0: Ronaldo heads Bianconeri to Supercoppa glory|
|Kane injury cannot be excuse for Tottenham – Pochettino|
|Woods to open 2019 schedule at Torrey Pines|
|Reported Liverpool target Dabbur to undergo Sevilla medical|
|Lebanon v North Korea: Radulovic calls on players to make history|
|MLS MVP Martinez signs five-year contract with Atlanta|
|WBC set deadline for Wilder-Fury rematch|
|Iran 0 Iraq 0: Team Melli top Group D after dull draw|
|Vietnam 2 Yemen 0: Quang Hai shines to give Golden Dragons hope|
|Bielsa admits to spying on all Leeds´ opponents|
|Valverde open to arrivals amid De Jong tug-of-war|
|Sexton named in Ireland squad for Six Nations openers|
|Higuain benched for Supercoppa Italiana amid Chelsea links|