KARACHI: Babar Azam's glorious unbeaten 102 kept Pakistan alive but Australia remained on course for victory in the second Test in Karachi on Tuesday.
Set a record victory target of 506, Pakistan lost two quick wickets but Babar would not go down without a fight.
The right-hander combined with opener Abdullah Shafique in a 171-run unbroken partnership for the third wicket in a spectacular rearguard spread over nearly 60 overs.
Pakistan finished day four on 192-2, still 314 behind their target and needing something extraordinary on Wednesday to deny Australia a 1-0 lead in the three-Test series.
Babar's sixth Test century contained 12 fours.
Abdullah was batting on 71, which included four fours and a six.
Earlier, Australia batted for 25 minutes on Tuesday before declaring their second innings on 97-2, challenging Pakistan to pull off the greatest fourth innings chase in Test cricket history.
Marnus Labuschagne fell for 44, while his Islamabad-born team mate Usman Khawaja followed his first innings 160 with an unbeaten 44.
Cummins strikes
After four maiden overs of pace bowling against Pakistan, Australia captain Pat Cummins unleashed spin from both ends and was rewarded almost immediately.
Nathan Lyon caught opener Imam-ul-Haq (one) plumb in front of the wicket for one in his first over.
Australia in box seat after Pakistan wilt in Karachi
Cummins introduced Cameron Green after lunch and the all-rounder responded by ending Azhar Ali's 54-ball stay with his second delivery.
Azhar (six) ducked under a short delivery that never rose and was given lbw even though replays suggested the ball had brushed his glove before hitting him.
Azhar had a long chat with Abdullah before he accepted the decision, perhaps wary of burning a second review after Imam had wasted one.
Pakistan had to wait until the 26th over for their first boundary of the innings, when Babar drove Mitchell Swepson past point.
Steve Smith dropped Abdullah, then on 20, in the slip and it proved a costly mistake as the opener closed in on his second hundred of the series.
Babar swept Swepson for two to bring up his first Test century in more than two years which earned him a standing ovation from his team mates.