Younis Khan hit an epic 213 for his fifth double hundred and also completed 8,000 Test runs as Pakistan dominated the Australian bowling at Sheikh Zayed Stadium.
Skipper Misbah-ul Haq notched 101 for his sixth Test hundred after Pakistan resumed at 304-2.
Azhar Ali was the only man out in the morning session for 109, while for Australia Mitchell Starc was the best bowler with 2-86.
Pakistan lead the two-match series 1-0 after winning the first Test by 221 runs in Dubai.