Asad Shafiq missed out on a century but scored a fluent 80, adding 150 runs for the fifth-wicket stand with Sohail as Australia's bowlers toiled for almost two days under hot and humid conditions on a flat wicket.
Earlier in the Test, Pakistan batted first and scored 482 runs and Australia was able to post only 202 runs in their first innings in reply.
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.
Australia had gone into lunch with 137-0 on the board, but just moments after the break Finch lost his wicket to Mohammad Abbas for 62 runs.
"People think because of my relaxed nature. that I've been gifted to be able to get to where I am", he said. Aaron Finch, one of three debutants for Australia in this Test, also had a great match while Paine, who took over as captain after Steve Smith's suspension, remained unbeaten on 61 to deny Pakistan victory.
Shafiq (80, 165 balls, 9 fours, 1 six) missed out on what could have been his 10th Test century at number six in the batting order.
Khawaja and Finch had a tricky spell to get through and though both Yasir and Hafeez appealed to have the latter trapped in front, he survived through to stumps.
Head was given not out and Sarfraz decided against a review but replays showed he was plumb.
No team has successfully chased more than the 418-7 West Indies made against Australia in the Antigua Test in 2003.
But the tourists focused on procuring the draw once debutant Marnus Labuschagne (13) fell lbw to Shah in the middle session as they were reduced to 252-5 in the Emirates.
Asad Shafiq and Haris Sohail then went on to score a partnership of 69 runs on the fifth wicket.
Holland had figures of 3-83 from 20 overs while off-spinner Nathan Lyon took 2-58.