Australia named three debutants with batsmen Aaron Finch, Travis Head and Marnus Labuschagne coming into the team for its first test since the ball-tampering incident at Newlands, South Africa in March that saw captain Steve Smith, David Warner and Cameron Bancroft receive lengthy bans for their part in trying to change the condition of the ball with a piece of sandpaper. Australia still trail Pakistan by 452 runs.
But Australia delaying the second new ball allowed Sohail and Shafiq to open up in the second hour, adding 55 more runs.
The milestone capped a remarkable return for Hafeez, who was overlooked from Pakistan's original 17-man squad and has not played Test cricket since 2016.
Pakistan vs Australia 1st Test Day 3 Live Cricket Score Streaming Online, Pak vs Aus Live Cricket Score: Usman Khawaja and Aaron Finch will lead Australia's task of fighting against Pakistan's first innings total of 482 runs in the first Test in Dubai. He started the over - the 144th of the innings - with a rank full toss that was swatted away to the deep midwicket fence by Shafiq, but followed it up with a spitting leg-spinner that would have made Shane Warne proud.
Nathan Lyon finally broke the 205-run partnership when he had Imam caught behind in the second over after tea as the left-hander got a faint edge while going for a hard cut against the off-spinner.More news: Hamilton edges closer to fifth title as Vettel crashes
Pakistan are still in control of the game, mostly because of the bowlers' efforts, with a tall 325-run lead on the board.
Haris Sohail was unbeaten on 46 and Asad Shafiq on 43 not out for the loss of just one wicket after resuming at 255-3. The first over after the interval brought the visitors even more joy with Babar Azam run out for 4.
Peter Siddle was the only successful bowler on Monday morning as Australia had yet to take the new ball.
Asif is the 11th Pakistani bowler to take five or more wickets in an innings on Test debut. Finch and Khawaja started off pretty well, rotating the strike at every given chance.