Cameron Green made 79 in his 12th test match and Alex Carey scored 67 against the persistent reverse swing from Naseem, who took 4-58, and Shaheen, who picked 4-79.
Naseem bowled his heart out in 31 overs of relentless pace and reverse swing in hot conditions as he and Afridi wrapped up Australia’s tailenders.
“He (Naseem) bowled really well all day, he was getting the ball to reverse pretty largely both ways,” Green said.
“Unfortunately, just a lack of concentration (by me) when you’ve been batting out there for a while. I thought I saw the ball go away from me but it came back in. That’s kind of what you face over here.”
Green and Carey came together late Monday. With Australia on 232-5, they added 88 runs on Tuesday in the first session, when both reached their fifties.
Left-hander Carey successfully overturned a controversial caught behind decision. Umpire Aleem Dar adjudged Carey out on 27 off Hasan Ali’s full-pitched delivery, but video suggested the ball missed Carey’s bat and might have clipped the off stump as wicketkeeper Mohammad Rizwan caught the bumped ball.
Carey raised his second half-century on the tour off 73 balls when he smashed two successive boundaries in offspinner Sajid Khan’s one over before pushing the ball to wide mid-on for a single.
Green, resuming on 20, reached his half-century off 117 balls when he drove past a diving Sajid for two runs.
Pakistan broke them up in the fourth over after lunch.
Left-arm spinner Nauman Ali ended their stand when Carey was plumb leg before wicket as the batter tried to play across the line and was hit on the front pad. Carey faced 105 balls and dominated the spinners with his reverse sweep shots.
Green showed lots of patience and used his feet well against the spinners during his 163-ball knock that spanned well over 3 1/2 hours.
Naseem, who replaced allrounder Faheem Ashraf in the only change to Pakistan from the second test, denied Green his maiden test hundred when he clean bowled the tall right-hander off a delivery which shaped into the batter and hit the stumps through a big gap between bat and pad.