Yasir Shah took his first in the match when he dismissed Marnus Labuschagne for 13.
Pakistan resumed at 45-3 in the morning session and batted sensibly on a deteriorating pitch before declaring their second innings at 181-6.
Preview: Mohammad Abbas unearthed the reverse-swing on offer on day four at the Dubai International Cricket Stadium and captured three wickets in no time to leave Pakistan in a strong position against Australia in the first Test on Wednesday.
Catch all the live updates from Day 5 of the first Test between Pakistan and Australia in Dubai.
A valiant Khawaja dug in for eight hours and 44 minutes, scoring 141 off 302 balls in the second-longest knock ever in the fourth innings of a Test.
Sohail, who raised his century off 223 balls, tried his favourite cut shot off Nathan Lyon (2-114) and was caught behind as Australia struck with regular intervals.
The breakthroughs will provide some slight hope but Tim Paine's men will rue a post-lunch collapse which undid a highly-promising start.
The depleted Australian squad was expected to struggle in the UAE, but Paine could hardly have asked for a more spirited display to begin his first full series in charge.
On day 4 at stumps, Pakistan bowlers bowled some good deliveries to take three wickets including inform Finch, Mitchell Marsh and Shaud Marsh, who got out for duck.
Australia's tail failed to wag but the blame will rightly fall on a middle order that failed to contribute a score of note.
Test debutant Aaron Finch (62) and Usman Khawaja (85) both appeared on track for centuries after putting on Australia's second-highest opening partnership in Asia.
It was an action replay of the first innings as Australian openers put on 87 - they made 142 in their total of 202 on Tuesday - as Finch was trapped leg-before soon after tea with a sharp incoming delivery from Abbas.
Pakistan in their first innings scored 482 runs with Muhammad Hafeez and Haris Sohail making tons.
- Hurricane Michael Strengthens to Cat 3, Heads for Florida Panhandle
- Here's the latest Facebook hoax you should know about
- Jose Mourinho could still be sacked by Manchester United
- Missing journalist: Ankara expects Riyadh's cooperation
- Nikki Haley Stuns Washington by Announcing Resignation From U.N
- Trump declares Kavanaugh 'proven innocent', internet calls him out
- Hurricane Michael European Model Shows Storm Intensifying
- Canada concerned over reports Saudi journalist killed
- Google+ leaked personal details, will be shut down
- Michael officially a hurricane, tropical storm effects expected in Chatham County