Australia were set a big target of 538 to win the second Test after Pakistan declared their second innings at 400-9 on the third day in Abu Dhabi on Thursday.
Babar Azam missed a maiden hundred by one run while Sarfraz Ahmed (81), Azhar Ali (64) and Asad Shafiq (44) also chipped in with useful contributions at Sheikh Zayed Stadium.
Pakistan made 282 in their first innings while Australia were dismissed for 145 in reply.
For Australia, off-spinner Nathan Lyon finished with 4-135. The first Test ended in a draw in Dubai last week.