David Warner hit a superb century and Usman Khawaja 95 not out as Australia closed the third day of the second Test with Pakistan at the MCG on 278-2 in reply to the tourists' 443-9.
Earlier Azhar Ali finished unbeaten on 205 - the second highest score by a visiting batsman at the MCG after Sir Viv Richards' 208 in 1984.
In the morning session Mohammad Amir reached 29 before feathering Mitchell Starc down the leg side to Matthew Wade.
But No 9 Sohail Khan then launched into the Australian attack, smashing four sixes while Azhar, 139 not out overnight, worked his way steadily to his double century.
The duo added 88 in just 10 overs before lunch, but after the break Sohail was run out for a run-a-ball 65, and after Azhar prodded the ball to square leg to reach 200, Wahab Riaz's dismissal for one brought about the declaration.
The hosts lost opener Matthew Renshaw for 10, bowled by a beauty from leg-spinner Yasir Shah, but Warner and Khawaja then played aggressively.
Shah was particularly loose, and conceded six an over, while Riaz's left-arm pace was also crunched around the famous old ground.
Australia reached tea on 131-1, with Warner making 77 off 78 balls.
Wahab thought he had Warner soon after the break but had overstepped his mark - the middle of a hat-trick of no balls as the quick bowler was plagued by problems placing his front foot.
Instead, Warner brought up his 17th Test century and first at the MCG when he sent the 113th delivery he had faced away for four.
Warner accelerated to 144 from 143 balls before he was given out on review, with replays showing a mark on his glove as he swung at a Wahab delivery.
Khawaja and skipper Steven Smith reached stumps unscathed and will resume on day four with Australia 165 runs adrift.
New customer winter madness offer: save over 40% on your Sky Sports Month Pass, just £20