Azhar Ali scored an unbeaten 205 as Pakistan declared on 443-9 before David Warner's 144 from 143 balls sparked hopes of an Australian comeback on day three of the second Test in Melbourne.
The hosts ended on 278-2 after Warner's 198-run partnership with Usman Khawaja helped cut Pakistan's lead to 165.
Khawaja was unbeaten on 95, with captain Steve Smith on 10 not out.
Warner was reprieved on 81 when he was bowled by a no ball before being caught behind off a later Wahab Riaz delivery.
Pakistan pace bowler Wahab sent down a total of 10 no balls, including three overstepped marks in the over of Warner's non-dismissal.
Azhar's superb double hundred was the highest innings by a Pakistan player in Australia, and only three runs short of the record for touring batsmen at the Melbourne Cricket Ground, set by West Indies' Viv Richards in 1984.
The 31-year-old also became his nation's first player to surpass 200 twice in a calendar year, having scored an unbeaten 302 against West Indies in Dubai in October.
Australia lead the three-Test series 1-0.