Australia set up a Champions Trophy semi-final meeting with England after they clinched top spot in Group A with a last-ball victory over Pakistan at Centurion today.
Ricky Ponting's side began the day knowing victory would book their place in the last four and after restricting Pakistan to 205 for six, were seemingly cruising to their target at 140 for two.
However, they then lost six for 47 to throw their qualification to the semi-finals into jeopardy with India also on course to achieve the thumping win against West Indies they needed if Australia fell short.
But Brett Lee and Nathan Hauritz held their nerve under pressure to score the 19 runs they needed from the 25 balls available.
It means Australia will now again meet England, less than a fortnight after spending four months in each other's company during the Ashes Tour, in Friday's last-four clash at Supersport Park.
Australia will have the advantage of having seen first hand the surprises on offer in the SuperSport Park wicket which played a major role in today's game.
Mike Hussey (64) was the only batsman to pass fifty on a tricky surface on which the batsmen found it difficult to play their strokes.
Hussey combined with his skipper Ricky Ponting in an 81-run stand for the third wicket after openers Shane Watson (22) and Tim Paine (29) had got the Australians off to a solid start.
Ponting had patiently reached 32, from 64 balls, when he mis-timed a slog-sweep off Shoaib Malik for Umar Gul to take a fine diving catch in the deep.
It triggered the middle-order collapse as Pakistan fought their way back.
Saeed Ajmal bowled Callum Ferguson (seven) with a ball that turned viciously before Hussey's fine innings was ended when Rana-ul-Naved knocked back his off stump with a yorker.
Mohammad Asif was making his return to international cricket after his lengthy ban and grabbed two wickets in an over when James Hopes (one) ballooned a drive to Younus Khan before nipping one back off a length to bowl Cameron White (five) and leave Australia struggling at 176 for seven.
Australia then applied the batting powerplay and Johnson (nine) hit Ajmal to the cover boundary but was bowled next ball to leave his side needing 18 from the final four overs.
Naved then bowled a maiden, his second in a row, to even the equation, before Ajmal's next over cost eight.
Australia needed three from the final over to get the tie that was enough to send them through and achieved that from the final ball, before a scampered bye from the final ball gave them a ninth win from their past 10 ODIs.
Earlier Pakistan failed to capitalise on a brisk start as their middle-order struggled with the wicket.
Shahid Afridi was promoted to the top of the order and added 15 from 18 balls before he spooned a pull shot off Johnson to backward square where Hopes took a good sprawling catch.
Fellow opener Kamran Akmal played some fine off-side strokes but was undone when he attempted to pull Watson and dragged on for 44 to leave Pakistan 75 for two in the 19th over.
Shoaib Malik announced his arrival with a glorious straight six off Hopes, but from there the scoring slowed with just 71 runs added between overs 20 and 40.
Younus laboured to 18 from 49 balls before he lost patience and lofted a drive off Hopes that Johnson held onto after retreating back from mid-on.
Johnson then took his 100th ODI wicket when Shoaib (27) found Ponting at short cover.
Hauritz slowed the rate further, conceding just 24 from his seven overs, before Lee had Mohammad Yousuf (44) caught by White at square leg in the batting powerplay.
Misbah-ul-Haq (41) was out in comical fashion in the final over when he conspired to stamp on his own stumps to a Watson wide as Pakistan crawled past 200.