Tillakaratne Dilshan took a brilliant one-handed catch to end a stubborn last-wicket partnership of 41 as Sri Lanka beat Australia by 20 runs on Monday to reach the Champions Trophy semi-finals.
Australia, needing to reach their target of 254 in 29.1 overs to make the last four, came out all guns blazing but they lost wickets at regular intervals and, at 192 for nine, looked to be heading for a heavy defeat in the final Group A match.
But Clint McKay and Xavier Doherty resisted for 75 balls, adding 41 runs for the last wicket to give Australia genuine hope of a victory that would have sent New Zealand through to the last four instead of Sri Lanka.
The Australians still had more than seven overs to score the 21 runs they needed when McKay, on 30, scooped the ball firmly back towards the bowler who leaped to his left and clung on to a spectacular catch before being mobbed by his ecstatic team mates.
"We knew it was going to be tough," Sri Lanka captain Angelo Mathews said at the presentation ceremony.
"A big thank you to all the Sri Lanka supporters for turning up in such large numbers. I've never seen a crowd so big at The Oval. Our main objective was to get to the semis, so first of all we will enjoy tonight and then focus on India."
Sri Lanka will play India in the second semi-final on Thursday and group winners England face South Africa on Wednesday. Australia, winners of the last two Champions Trophies, finished bottom of the group and exit the tournament along with New Zealand.
"It would have been nice to win, but the goal for us was to win inside 29 overs," Australia captain George Bailey said.
"We showed a little bit of fight, but it has been a disappointing tournament for us."
Australia started brightly after winning the toss and left-armer Mitchell Johnson trapped Kusal Perera lbw with the third ball of the match.
Kumar Sangakkara, whose brilliant century won last week's match against England on the same ground, spooned a catch to cover off McKay to leave Sri Lanka in trouble at 20 for two.
But the experienced Dilshan and 23-year-old Lahiru Thirimanne repaired the damage with a steady third-wicket partnership of 72.
Dilshan made 34 and Thirimanne reached his fifth one-day international century off 72 balls before he was out for 57, pulling Johnson to Shane Watson at mid-wicket.
Mahela Jayawardene assumed responsibility for anchoring the innings and his 69th one-day fifty was packed with trademark wristy strokes.
The former captain became the eighth batsman to score 11,000 runs in limited-overs internationals and he struck 11 fours to earn the man-of-the-match award.
"Most important was winning and getting to the semi-finals," Jayawardene said. "We're playing hard, passionate cricket, but enjoying each other's success has been the mantra for us for a long time."
Dinesh Chandimal launched McKay over long-on for the first six of the innings in a breezy 31 off 32 balls and, although Sri Lanka lost wickets at regular intervals, Jayawardene worked the ball around effectively in the closing overs.
Australia signalled their intent when Watson thumped the first ball of the innings to the extra-cover boundary.
The powerful opener was bowled by Nuwan Kulasekera for five but Glenn Maxwell, promoted up the order, launched a blistering attack, hitting a six and five fours in his 32 off 20 balls.
Maxwell was bowled by Lasith Malinga, Phil Hughes fell to Kulasekera for 13 and Bailey, dawdling over a quick single, was run out by Kulasekera's direct hit.
Australia continued to play their shots and Matthew Wade made 31 off 23 balls before skying a catch to Dilshan on the long-off boundary.
They got past 164, ensuring Sri Lanka could not finish above England on net run rate, and Adam Voges made 49 before becoming the ninth man out with the score on 192.
McKay and Doherty batted sensibly, however, picking up singles at will and the Sri Lankans looked short of ideas on how to separate them until Dilshan's inspired intervention.