Opener David Warner smashed a quickfire 75 and Chris Rogers was on 31 to take Australia to 113 without loss at close of play on the second day, trailing by 341 runs with all ten wickets standing.
Warner hit seven fours and a six in his eighth Test half-century, his sixth in succession, as Australia matched Pakistan’s batting.
Pakistan could have removed Rogers on 13 in left-arm spinner Zulfiqar Babar’s first over but Younis Khan failed to hold a straightforward catch in the slips.
Warner reverse swept debutant leg-spinner Yasir Shah for his fifth boundary to reach his run-a-ball 50.
Earlier, Pakistan’s total had been lifted by Ahmed.
Ahmed, who scored his first hundred in Sri Lanka two months ago, fell in the last over before tea, stumped off spinner Nathan Lyon for 109. He batted for 148 minutes and hit 14 boundaries in all.
He completed his hundred off just 80 balls, hitting paceman Mitchell Marsh over the slips for the fourth fastest century by a Pakistani.
Majid Khan holds the record for the fastest Test hundred by a Pakistani in terms of deliveries faced, on 74 balls, while Shahid Afridi hit hundreds off 78 balls on two occasions.
Pakistan added 235 runs after resuming on their overnight score of 219-4 with Ahmed, Misbah-ul Haq and Asad Shafiq all coming good on a flat pitch which had little for the bowlers.
Ahmed added an important 124 runs for the sixth wicket with Asad Shafiq (89) to build the innings after Shafiq added 93 with skipper Misbah, who made 69.
Misbah, under pressure to score after managing just 67 in the 2-0 Test defeat in Sri Lanka two months ago, hit two fours and two sixes during his 255-minute stay at the crease.
Misbah, who was 34 overnight, reached his first half-century in nine innings with a push for a single and then launched an attack, hitting Lyon for a six over long-on.
He also hit Smith for a six but played one shot too many, holing out much to the delight of the Australians.
Shafiq fell short of his hundred by 11 runs as he holed out to Steve O’Keefe, the left-armer’s first Test wicket, after hitting five fours and two sixes during his 151-ball stay.
Johnson (3-39) led a hapless Australian attack with left-arm spinner O’Keefe struggling to take 2-107 while Lyon toiled hard for 1-148 in 36.4 overs. -AFP