Australia were 136 for two in their second innings, just 34 behind, when bad light forced an early close on the second day.
Ponting, the Australia captain, was 61 not out -- the first fifty of the match on either side -- and Michael Clarke 32 not out following a wicketkless final session.
Their stand was worth 81 -- almost as many as Australia made when dismissed for just 88 in a dramatic first innings collapse.
Australia had been 170 behind on first innings after Pakistan made 258.
All-rounder Shane Watson took six wickets for 33 runs in 11 overs -- the second time in as many matches he has taken Test-best figures -- as Pakistan failed to bat Australia out of the game.
Australia have won their last 13 Tests against Pakistan and in January triumphed by 36 runs at Sydney despite a first innings deficit of 206.Ponting’s innings saw him get the 40 runs he needed to join India great Sachin Tendulkar as the only other batsman to have scored 12,000 Test runs.
An edged four to third man off left-arm quick Mohammad Aamer took Ponting to the milestone on a ground where he made his first Test hundred back in 1997.
Mohammad Asif’s figures of none for 42 off 13 overs were harsh on the seamer, who saw a number of close calls against both Ponting and Clarke go in the batsmen’s favour.
And when he did err, Ponting pounced to force Asif through cover point and pull him for well-struck fours in nearly three hours at the crease.
Australia were 62 for two, still 108 behind, at tea. Ponting had survived several lbw appeals while padding up to be 18 not out and Clarke was unbeaten on two.
Watson helped Ponting add 40 for the second wicket. But the opener, on 24, fell to occasional medium-pacer Umar Amin when he played on trying to cut and Australia were 55 for two.
Australia’s second innings, like their first, began under grey skies.
And when opener Simon Katich was bowled round his legs, after shuffling across the crease in trademark fashion, by Aamer, Australia were 15 for one and in danger of a fresh collapse. The 18-year-old Aamer might have had Ponting lbw for nought when the star batsman padded up and played no stroke to an inswinger. But Rudi Koertzen, in the South African’s last Test as an umpire, was unmoved.
Watson, who took two wickets on Wednesday, produced a post-lunch burst of four wickets for seven runs in 13 balls as Pakistan were dismissed for 258.
AUSTRALIA (I Innings) 88 all out
PAKISTAN (I Innings, O/n 148/3)
Farhat lbw Watson 43
Butt b Hilfenhaus 45
Ali c Paine b Watson 30
Amin c North b Hilfenhaus 25
U Akmal c Paine b Johnson 21
Malik c Paine b Watson 26
K Akmal c North b Watson 15
Aamer lbw Watson 0
Gul b Watson 0
Kaneria (run out) 15
Asif (not out) 9
Extras (B- 11, LB-9, NB-9) 29
Total (all out, 64.5 overs) 258
Fall of wickets: 1-80, 2-133, 3-140, 4-171, 5-195, 6-222, 7-222, 8-224, 9-234.
Bowling: Doug Bollinger 17-4-50-0, Ben Hilfenhaus 20.5-3-77-2, Shane Watson 11-3-33-6, Mitchell Johnson 15-0-71-1, Steven Smith 1-0-7-0.
AUSTRALIA (II Innings)
Watson b Amin 24
Katich b Aamer 11
Ponting (batting) 61
Clarke (batting) 32
Extras (B-4, W-2, nb-2) 8
Total (for 2 wkts; 41 overs) 136
Fall of wickets: 1-15, 2-55.
Bowling: Mohammad Aamer 9-2-19-1, Mohammad Asif 13-1-42-0, Umar Gul 5-0-36-0, Umar Amin 6-1-12-1, Danish Kaneria 8-0-23-0.