Australia was threatening to inflict another heartbreaking defeat on Pakistan after it fought back valiantly on the second day of the second Test at Headingley.
Pakistan, without a Test win over Australia in 15 years, had looked in pole position after skittling the Antipodeans for 88 on Wednesday, but career-best figures of six for 33 from Shane Watson and a defiant unbeaten 61 from Ricky Ponting today began to turn the tide of the game Australia's way.
After bowling Pakistan out for 258 mid-way through the day, Australia was 136-2 when bad light forced a premature end - meaning it trailed by 34 runs.
That seemed the most unlikely of scenarios even at lunch when Pakistan had forged a 130-run lead with five wickets still in hand.
But a devastating spell from Watson, who claimed four for seven in 13 balls just after the lunch break, broke open the game as the all-rounder completed his second five-wicket haul in successive games after he also achieved the feat in the 150-run win at Lord's last week.
Ponting then defiantly set about erasing the deficit, and along the way became the second batsman to reach 12,000 Test runs and, amazingly, the first batsmen to score 50 in a match that hardly looks like going beyond a third day.
By stumps Ponting had put on an unbeaten 81 for the third wicket with his vice-captain Michael Clarke (32 not out) as their stand served to revive memories of their stunning Test win over Pakistan in Sydney in January.
In that game Australia recovered from being bowled out for 127 in their first innings, and then conceding a 206-run first innings lead, to win by 36 runs on a stunning final day.
Whether those memories will haunt Pakistan as it aims to inflict a rare defeat over Australia remains to be seen, but certainly its inability to strengthen a match-winning position would not have settled any nerves.
After taking a 170-run first-innings lead it had begun well with the ball when they removed Simon Katich for just 11 when he was bowled around his legs by Mohammad Aamer.
It could have had Ponting, who had not passed 50 in his previous six Test innings, early as well as he survived two good shouts for lbw from the first two balls he faced from Aamer.
After his early discomfort Ponting settled in alongside Watson in a stand of 40 that was unexpectedly halted by the part-time medium pace of Umar Amin.
With tea in sight Watson chopped an innocuous delivery onto his stumps when he was on 24, prompting the right-hander to throw back his head in frustration.
But after tea Ponting and Clarke looked immovable as they set about erasing the deficit without alarm.
Along the way Ponting became just the second batsman to 12,000 Test runs, after Sachin Tendulkar, with a glide to the third-man boundary before reaching the 52nd half-century of his 146-Test career. And he ominously looked intent on adding more alongside Clarke before the fading light stopped play at 5.35pm.
Earlier, Watson had come to Australia's rescue with the ball after its front-line bowlers again failed to fire.
Pakistan had added 70 in a morning session delayed for 45 minutes by overnight rain, with only the loss of Umar Akmal and Umar Amin to Mitchell Johnson (one for 71) and Ben Hilfenhaus (two for 77)