Seemingly under control after restricting Pakistan to a modest 148 all out, Australia partially blew the advantage after being reduced to 100 for four in their second innings, a lead of 205 runs, after bad light stopped play on a dramatic day when 16 wickets tumbled.
Simon Katich (49 batting) and night watchman Mitchell Johnson were holding fort for the Australians.
Earlier, Australian all-rounder Shane Watson earned a place on the Lord's honours board with his medium-pace bowling by running through the frail Pakistan batting.
Watson returned his best Test figures of five for 40 from 7.5 overs as Pakistan succumbed in 40.5 overs in their first innings, a deficit of 105.
Only opener Salman Butt provided any sustained resistance with a composed 63 in nine minutes short of three hours, before he was clean bowled by Watson.
Pakistan were uneasily placed at 75 for three, when Ricky Ponting invited Watson to bowl from the Nursery End and he responded by dismissing the two Akmal brothers in identical fashion within the space of four balls.
Skipper Shahid Afridi (31 off 15, 4x4, 2x6) opted to bring Twenty20 cricket to the test arena, but after transforming Watson's figures from two for nought to two for 30 the hard-hitting batsman was caught at mid-off by Mitchell Johnson trying another big hit.
Mohammad Aamer gave Paine his fourth catch of the innings when he was caught behind for a duck. Watson took a comfortable catch at first slip off Doug Bollinger to dismiss Umar Gul for seven before bowling Butt with a delivery which ducked in late to the left-hander.
He captured his fifth wicket when Steven Smith snapped up an edge from Danish Kaneria (14).
Score Board
AUSTRALIA (I Innings, O/n: 229/9):
Watson b Aamer 4
Katich c K Akmal b Asif 80
Ponting c Amin b Aamer 26
Clarke lbw Asif 47
Hussey (not out) 56
North b Asif 0
Paine c K Akmal b Gul 7
Smith lbw Kaneria 1
Johnson b Kaneria 3
Hilfenhaus b Aamer 1
Bollinger b Aamer 4
Extras (B-10, LB-2, W-2, NB-10) 24
Total (all out, 76.5 overs) 253
Fall of wickets: 1-8, 2-51, 3-171, 4-174, 5-174, 6-206, 7-208, 8-213, 9-222.
Bowling: Aamer 19.5-2-72-4, Asif 19-5-63-3, Gul 17-3-32-1, Afridi 3-0-25-0, Kaneria 18-7-49-2.
PAKISTAN (I Innings):
Farhat c Paine b Hilfenhaus 4
Butt b Watson 63
Azhar Ali c Paine b Hilfenhaus 16
Amin c Paine b Johnson 1
U Akmal lbw Watson 5
K Akmal lbw Watson 0
Afridi c Johnson b Watson 31
Aamer c Paine b Bollinger 0
Gul c Watson b Bollinger 7
Kaneria c Smith b Watson 11
Asif (not out) 4
Extras (LB-2, NB-1) 3
Total (for 9 wkts, 39 overs) 148
Fall of wickets: 1-11, 2-45, 3-54, 4-75, 5-83, 6-117, 7-117, 8-129, 9-133.
Bowling: Doug Bollinger 11-3-38-2, Ben Hilfenhaus 12-2-37-2, Mitchell Johnson 10-2-31-1, Shane Watson 7.5-1-40-5.
AUSTRALIA (II Innings):
Watson c Farhat b Asif 31
Katich (batting) 49
Ponting lbw Asif 0
Clarke b Gul 12
Hussey c Farhat b Gul 0
Johnson (batting) 2
Extras (LB-1, NB-5) 6
Total (for 4 wkts, 29.3 overs) 100
Fall of wickets: 1-61, 2-73, 3-97, 4-97.
Bowling: Aamer 8.3-2-30-0, Asif 9-2 -30-2, Gul 5-2-7-2, Kaneria 7-1-32-0.