Teams will now move to Abu Dhabi for the second and final match of the two-Test series
Australia, led by a fighting 141 by opener Usman Khawaja, hung on to draw the first Test against Pakistan in Dubai, keeping the two-Test alive on Thursday.
Chasing 462 to win, Australia finished on 362-8 as both teams shook hands with one delivery to go in the Test at Dubai stadium.
Khawaja followed up his first innings score of 85 with a fighting century while debutant Head went back to the hut after scoring 72 runs.
Khawaja had added an invaluable 132 runs for the fourth wicket with Travis Head (72) as Pakistan failed to get a single wicket in the first session after Australia resumed at 136-3.
Pakistan had expected early wickets after jolting Australia to 136-3 at the close on the fourth day, but nothing worked for skipper Sarfraz Ahmed, who made multiple bowling changes.
Pakistan could have had Head leg-before off leg-spinner Yasir Shah on 44, but Sarfraz did not review English umpire Richard Kettleborough's not out decision when replays showed the ball hitting the wickets.
Pakistan were only rewarded after lunch when they took the second new ball as soon as it was due and Hafeez trapped Head leg-before with the first ball.
Yasir Shah took his first in the match when he dismissed Marnus Labuschagne for 13.
No team has successfully chased more than the 418-7 West Indies made against Australia in the Antigua Test in 2003.