Australia withstood a pulsating spell of fast bowling from Pakistan’s Wahab Riaz to set up a meeting with India in the World Cup semi-finals.
Australia’s hopes of chasing 214 looked in peril when Riaz removed David Warner and Michael Clarke to leave them 59-3.
But Steve Smith countered with a measured 65 and Shane Watson capitalised on a dropped catch to steer Australia home with an unbeaten 64.
Earlier, Josh Hazlewood took 4-35 as Pakistan slid from 97-2 to 213 all out.
Australia’s victory keeps them on course for a fifth World Cup victory and sets up a chance to avenge their 2011 quarter-final defeat by India in Sydney next week.
For a short period, however, their progress was in serious doubt as Riaz rattled their top order with a hostile spell of left-arm fast bowling that had Kevin Pietersen and Allan Border purring in the Test Match Special commentary box.
Sending the ball down at over 90mph, Riaz had Warner caught off a mistimed uppercut before Clarke was undone by a throat-high bouncer that lobbed up off the splice into the hands of Sohail Maqsood at short midwicket.
With Pakistan on top, Watson was given a working over by the fired-up Riaz, who also took every opportunity to direct verbal barbs at the struggling batsman.
He almost became Riaz’s next victim when he top-edged a pull shot to fine leg where Rahat Ali got right underneath the ball only to let it slip through his grasp.
It looked a pivotal moment at the time and so it proved as Watson grew in confidence and began to drive and pull Pakistan’s less pacey bowlers to the boundary.
At the other end, Smith was calmness personified as he stroked his way to a run-a-ball fifty.
His dismissal, trapped lbw by Ehsan Adil, briefly gave Pakistan another sniff of an upset but once again their outfielding let them down as Sohail Khan dropped Glenn Maxwell on five.
Australia did not look back after their second reprieve as Maxwell bludgeoned 44 off 29 balls before Watson drove Khan down the ground for the winning runs.
Hazlewood had earlier justified his selection ahead of Pat Cummins with four wickets as Pakistan wilted after winning the toss.
After both openers fell to sharp slip catches, captain Misbah-ul-Haq and Haris Sohail added 73 for the third wicket before Maxwell’s spin made the breakthrough.
Having twice planted the spinner into the stands, Misbah attempted a slog-sweep but got a top edge to Aaron Finch at deep midwicket.
A combination of disciplined bowling and reckless shots followed as several Pakistan batsmen were unable to capitalise on good starts.
Their total looked well short of par, only for the outstanding Riaz to briefly raise the prospect of an upset.