Pakistan grabbed an early wicket after Babar Azam struck a fluent 99 to edge closer to claiming a series victory over Australia in the second Test at Abu Dhabi on Thursday.
Azam narrowly missed out on a hundred after an aggressive innings, while skipper Sarfraz Ahmed followed up his first-innings 94 with 81 as Pakistan declared their second innings at 400-9, setting a daunting 538-run target for the tourists.
By the close on the third day, Pakistan had Shaun Marsh dismissed for four — bowled by left-arm paceman Mir Hamza for his first Test wicket — to boost their chances of victory after Australia clung on for a thrilling draw in the first Test in Dubai last week.
Aaron Finch (24) and Travis Head (17) were at the crease with Australia, who are 47-1 and need another 491 for an unlikely win or to bat out two full days on a weary and spinning Sheikh Zayed Stadium pitch.
No team has ever chased more than 418-7 to win a Test, made by the West Indies against Australia at Antigua in 2003.
Pakistan piled on the runs with Azam, Sarfraz and Azhar Ali — who was the casualty of a bizarre run out — all making half-centuries to build on the hosts' 137-run first-innings lead.
But none of them could go on to score a ton, with Azam falling agonisingly close to his maiden hundred, trapped leg-before by medium pacer Mitchell Marsh.
Azam, who hit three sixes and six fours, improved on his previous best Test score of 90 not out he made in New Zealand two years ago.
He and Sarfraz added 135 runs for the sixth wicket to end any hopes Australia had of a fightback after taking the second new ball at 273-5.
Sarfaz struck five fours and a six and delayed the declaration in hope of a century, but fell leg-before to leg-spinner Marnus Labuschagne who finished with 2-74.
But the pick of the bowlers was off-spinner Nathan Lyon who followed his first-innings four wickets with 3-135 in a marathon 43-over vigil.
After a dull opening period, the embarrassing dismissal of Azhar brought the day to life. The batsman edged a Peter Siddle delivery towards the third-man boundary and, thinking the ball had crossed the rope, halted in the middle of the pitch to talk to fellow batsman Asad Shafiq.
But Mitchell Starc picked up the ball less than a yard from the boundary and threw it back to wicketkeeper Tim Paine, who ran Azhar out, leaving the Pakistani duo — who have combined experience of 130 Tests and over 9,000 runs — stranded and looking bewildered.
Azhar fell for a well-played 64, including four boundaries.
Pakistan had earlier lost Haris Sohail for 17, stumped by Paine off Nathan Lyon after resuming at 144-2.
The teams will play three Twenty20 internationals after the Tests, with the first in Abu Dhabi on Wednesday.