Australia strengthened their grip on the third and final Test as Peter Handscomb joined the list of centurions in Sydney but Pakistan fought back late on Wednesday.
Handscomb posted 110 to record his second ton in four matches and Matthew Renshaw fell narrowly short of a double century to help lead Australia to 538-8 before captain Steve Smith declared at the SCG.
Pakistan made a dreadful start in response, losing two quick wickets, but the tourists composed themselves to end the day 126-2 at stumps, still 412 runs adrift in their bid to avoid a series whitewash.
Josh Hazlewood (2-32) struck twice in the fourth over to claim the wickets of Sharjeel Khan (4) and Babar Azam (0), leaving the visitors reeling on 6-2, but Azhar Ali (58) and Younis Khan (64) then held firm to lead a mini fightback.
It could have been a lot worse for Pakistan, had David Warner converted both of his run-out opportunities in the field and held on to a catch at slips late in the day.
The talk of day one after scoring his maiden Test hundred, 20-year-old Renshaw returned to the crease Australia - leading the series 2-0 - resuming on 365-3.
Renshaw shared a 142-run partnership with Handscomb but the opener only added 17 runs to his overnight score, lasting less than 30 minutes into the second day after edging an Imran Khan (2-111) delivery onto his stumps.
The dismissal of Renshaw brought debutant Hilton Cartwright to the crease and the unheralded all-rounder made a perfect start to his Test career, hitting a boundary with his very first ball off Mohammad Amir (0-83).
Cartwright looked settled and composed, helping the hosts to 454-4 at lunch alongside Handscomb, before his handy 37-run knock was ended by Imran following the interval.
Handscomb - who made his debut in the third Test against South Africa in November - continued to lead the way in the middle and he got what he wanted in the second session, scoring the required 17 runs to bring up his 100, having also notched a century in the opening Test.
He eventually came unstuck when he dislodged his own stumps in a hit-wicket dismissal off the bowling of Wahab Riaz (3-89).
That prompted Smith to declare and, despite the resistance mounted by Azhar and Younis, Pakistan's early struggles have left Misbah-ul-Haq's team with a big task ahead of them if they are to avoid another loss.