Melbourne: Australia opener David Warner survived being clean bowled against Pakistan, before notching his maiden MCG Test century.
Warner's maiden ton at the famous Melbourne Cricket Ground gave Australia the momentum on day three of the Boxing Day Test.
David Warner slammed 144 off 143 balls with Usman Khawaja still at the crease on 94 with skipper Steve Smith on 10 to trail the tourists by 165 runs.
Azhar Ali had hit an unbeaten 205 in Pakistan's first innings, which was declared closed shortly after lunch.
The Australia opener brought up his 17th Test century in 113 balls, smashing 13 fours to help the hosts to 2-278 at stumps on Wednesday. Khawaja was batting on 95.
But the Aussie vice-captain was given a reprieve earlier in the day when he was bowled by Pakistan quick Wahab Riaz from a no-ball.
Warner has now scored more than 5000 career Test runs, with the 30-year-old the sixth-fastest Australian to reach the milestone.
The Aussie's ton took Australia finish two for 278 runs on day three, in reply to the tourists' massive first innings total of 9-443 declared.
Earlier, Azhar Ali's outstanding unbeaten 205 steered Pakistan to their imposing total, before the tourists decided to declare.
Azhar jumped and punched the air in delight when he reached his double century two overs into the middle session.
That was just short of the 208 by West Indian legend Viv Richards, the highest Test score by a visiting player at the MCG.
Azhar's effort was only the fourth Test double century by a non-Australian at the ground.
It is also the highest Test score by a Pakistan batsman in Australia and Azhar's highest score against Australia
Brief scores
Pakistan - 9 for 443 dec (Azhar 205*, Sohail 65, Shafiq 50, Hazlewood 3-50, Bird 3-113)
Australia - 2 for 278 (Warner 144, Khawaja 95*)
Status - Australia trail by 165 runs