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.
Sri Lanka won a tense Group A match against Australia winning by 20 runs and advance to the Champions Trophy semifinals where they will meet India on Thursday.
England will meet South Africa in the first semifinal on Wednesday.
The Sri Lankans, who finished second behind England in Group A, will play Group B winners India in the last four in Cardiff on Thursday.
New Zealand were eliminated along with Australia from Group A.
Australia's last pair of Clint McKay and Xavier Doherty nearly snatched victory from the jaws of defeat with a defiant stand of 41 runs in 12.1 overs.
Chasing a target of 254, Australia went hammer and tongs at the beginning as they made a valiant to reach it within 29.1 overs to qualify for the semifinals.
Maxwell led the charge after the fall of Watson smashing a 25-ball 32 with five boundaries and a six.
However, they slumped to 80 for five by the 13th over before making a recovery of sorts.
Wade cracked four boundaries and six his 31-ball 29 during a 47-run stand for the sixth wicket with Voges who played sedately.
Voges held the innings together after they failed to make the initial objective of qualifying by making 49 off 62 balls with two hits to the fence.
McKay hit a career-best ODI score of 30 and together with Doherty who was unbeaten on 15 nearly pulled off a miraculous win during their 41-run last wicket partnership.
Kulasekera caused the damage initially bowling Watson with his second delivery to finish with three for 42.
Herath claimed two for 48 while Malinga was also expensive going for 60 though claiming the wicket of Maxwell.
Dilshan takes a brilliant acrobatic return catch off McKay as Australia are all out for 233 in 42.3 overs.
C McKay c and b Dilshan 30 (58b 2x4 0x6)
McKay hits a boundary off Malinga and Herath to keep the match in suspense. Aus 216-9 in 35 overs.
Voges holes out to Eranga as Herath takes his second wicket. Aus 192-9.
A Voges c Eranga b Herath 49 (62b 2x4 0x6)
Voges keeps alive Australia's faint hopes of a victory hammering a boundary apiece off Eranga and Malinga. Aus 192-8 in 30 overs.
Kulasekera takes a skier from Johnson off Eranga as Australia crash to 168-8.
M Johnson c Kulasekara b Eranga 4 (4b 1x4 0x6)
Herath strikes as Faulkner is caught behind by Sangakkara. Aus 163-7.
J Faulkner c Sangakkara b Herath 17 (14b 3x4 0x6)
Faulkner smashes consecutive boundaries off Mathews. Aus 158-6 in 23 overs.
Dilshan takes a skier from Wade as Australia's hopes fade. Aus 130-6.
M Wade c Dilshan b Kulasekara 31 (23b 4x4 1x6)
Wade smashes a boundary over extra cover in an eventful over from Kulasekera. Aus 117-5 in 18 overs.
Wade hammers a boundary off Malinga in the first batting Powerplay over. Aus 109-5 in 17 overs.
Australia take the Batting Powerplay in the 16th over with the total 101-5 needing to reach the target in 29.1 overs if they are to qualify for the semifinals.
Wade hits a towering six off Herath as Australia make a desperate bid to stay in the hunt. Aus 101-5 in 16 overs.
Wade cracks a couple of boundaries off Mathews. Aus 92-5 in 15 overs.
Wade survives a confident shout for a lbw off Herath with Sri Lanka being unsuccessful with a decision review.
Australia are collapsing in a heap with Marsh being bowled by a slower delivery from Mathews. Aus 80-5.
M Marsh b Mathews 4 (14b 0x4 0x6)
Kulasekera strikes with a direct hit running out Bailey as they attempt to steal a single. Aus 69-4.
G Bailey run out 4 (7b 0x4 0x6)
Kulasekera bowls a good over putting the brakes on Australia's scoring. Aus 66-3 in 8 overs.
Malinga strikes bowling the dangerous Maxwell with a deceptive yorker. Aus 59-3.
G Maxwell b Malinga 32 (20b 5x4 1x6)
Malinga into the attack now with Australia plundering runs at a pace.
Maxwell smashes Kulasekera for another boundary to midwicket.
Hughes drives Kulasekera through point for a boundary but edges the next one behind to Sangakkara. Aus 45-2.
P Hughes c Sangakkara b Kulasekara 13 (10b 3x4 0x6)
Maxwell flays Eranga for another boundary through point and mid off. Aus 41-1 in 5 overs.
Hughes gets another streaky boundary off Eranga.
Maxwell slams Kulasekera through the covers and then lofts him for a straight six. Aus 28-1 in 4 overs.
Australia promote Maxwell as they look for quick runs.
Kulasekera draws first blood with his second delivery bowling Watson with an in-dipper. Aus 9-1.
S Watson b Kulasekara 5 (7b 1x4 0x6)
Hughes also edges a boundary off the first over from Eranga. Aus 9-0 in 1 over.
Watson hits a boundary off the first ball from Eranga smashing him through the covers.
Sri Lanka are in the driving seat thanks to a sparkling unbeaten half century by Mahela Jayawardena (84 off 81 balls with 11 fours) after being put into bat by Australia.
Australia need to reach the target in 29.1 overs if they are to qualify for the semifinals.
Sri Lanka will go through if they win the match.
If Australia win, New Zealand will go through to the semifinals.
If Australia are restricted to 164, Sri Lanka will top Group A.
Jayawardena reached the landmark of 11,000 ODI runs during his innings.
After losing Kusal and Sangakkara early, Dilshan (34) and Jayawardena rebuilt the innings with 72-run stand for the third wicket.
Thirimanne cracked a fluent 57 but Jayawardena held the innings together with a 65-run stand for the sixth wicket with Chandimal (31) with 36 runs coming off the batting Powerplay.
Johnson had the best return of three for 48.
SRI LANKA INNINGS
Mahela Jayawardene's classy unbeaten 84 lifted Sri Lanka to a competitive total of 253 for eight in their must-win Champions Trophy Group A match against Australia on Monday.
Sri Lanka, who need victory to reach the semi-finals, recovered from a poor start thanks to Jayawardene's patient knock and an assured 57 from youngster Lahiru Thirimanne.
Australia, who must reach their target in 29.1 overs to make the last four, started brightly 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 Clint McKay to leave Sri Lanka in trouble at 20 for two.
But the experienced Tillakaratne Dilshan and 23-year-old 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 pulling Johnson to Shane Watson at mid-wicket.
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.
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.
Johnson was the most successful Australian bowler with figures of three for 48.
Mahela smashes a boundary off Faulkner as Sri Lanka make 253-8 in 50 overs.
Herath is run out but Mahela is on strike in the final over for Sri Lanka. SL 244-8.
R Herath run out 2 (5b 0x4 0x6)
Mahela picks up another boundary cracking McKay to the point fence. SL 244-7 in 49 overs.
Kulasekera is run out attempting to steal a second run. SL 234-7.
N Kulasekara run out 6 (5b 0x4 0x6)
Johnson gets his third wicket as Chandinmal fails to clear mid-on. SL 224-5.
D Chandimal c Hughes b Johnson 31 (32b 1x4 1x6)
Chandimal cracks Faulkner for a boundary past third man. SL 222-5 in 46 overs.
The 50-run partnership between Mahela and Chandimal for the sixth wicket comes off just 46 balls. SL 212-5 in 45 overs.
Chandimal hits the first six of the innings clubbing McKay over long on.
Mahela scrambles for a single to reach the landmark of 11,000 ODI runs.
Mahela flicks Johnson for another boundary using the pace of the bowler. SL 200-5 in 44 overs.
Mahela slaps Johnson past gully for a boundary as he nears 11,000 runs in ODIs.
Mahela completes his 69th ODI half century off 57 balls. SL 186-5 in 42 overs.
Sri Lanka make 40 runs in the batting Powerplay overs. SL 178-5 in 40 overs.
Boundaries are flowing off the blade of Mahela quite easily. SL 175-5 in 39 overs.
Mahela is on song cracking McKay through the covers for another boundary. SL 166-5 in 38 overs.
Faulkner strikes as Mathews is bowled off an inside edge. SL 159-5 in 37 overs.
A Mathews b Faulkner 12 (20b 1x4 0x6)
Mahela sweeps a free hit from Faulkner to the fine leg fence.
Mathews smashes Johnson through the covers. SL 151-4 in 36 overs.
Mahela slams Johnson through point. SL 133-3 in 32 overs.
Johnson gets his second wicket as Thirimanne hammers straight to Watson at midwicket. SL 128-4.
L Thirimanne c Watson b Johnson 57 (86b 4x4 0x6)
Mahela takes on Maxwell sweeping consecutive boundaries, including a reverse hit.
Thirimanne completes his half century off 72 balls. SL 110-3 in 27 overs.
Doherty strikes as Watson takes a brilliant catch at slip to dismiss Dilshan. SL 92-3.
T Dilshan c Watson b Doherty 34 (58b 1x4 0x6)
Thirimanne hits a couple of boundaries off Marsh. SL 86-2 in 20 overs.
The 50 partnership for the third wicket between Dilshan and Thirimanne comes off 80 balls. SL 71-2 in 17 overs.
Thirimanne hits his first boundary off Faulkner clipping him to square leg and edges the next one past the keeper to the third man fence. SL 49-2 in 11 overs.
Sri Lanka are making cautious progress after the loss of Kusal Perera and Sangakkara cheaply. SK 40-2 in 10 overs.
A wicket maiden over from McKay. SL 20-2 in 4 overs.
Thirimanne comes ahead of Jayawardena after the loss of two wickets.
McKay strikes as Sangakkara drives straight to Maxwell at point. SL 20-2.
K Sangakkara c Maxwell b McKay 3 (11b 0x4 0x6)
Dilshan also opens his account with a boundary off McKay through the covers. SL 18-1 in 2 overs.
Johnson strikes trapping Kusal leg before as he shuffles across. SL 8-1.
K Perera lbw b Johnson 4 (3b 1x4 0x6)
Sri Lanka gets a boundary off leg byes in the second ball.
Kusal Perera hits a boundary off the first ball from Johnson cracking him over point.
Australia have won the toss and put Sri Lanka into bat in the final Group A match of the Champions Trophy at The Oval in London on Monday.
There are no changes in the Sri Lanka team while Michael Clarke will miss out once again for Australia.
Australia - S Watson, M Wade, P Hughes, G Bailey, A Voges, G Maxwell, M Marsh, J Faulkner, M Johnson, C McKay, X Doherty
Sri Lanka - K Perera, T Dilshan, K Sangakkara, M Jayawardene, D Chandimal, A Mathews, L Thirimanne, N Kulasekara, R Herath, S Eranga, L Malinga
Australia captain Michael Clarke hopes to be fit to return for Monday's final Champions Trophy Group A game against Sri Lanka after missing the first two matches with a back injury.
"I'm hopeful, no doubt about that, but I really have to wait to see how I pull up tomorrow morning after training again today," he told a news conference on Sunday. "My back is certainly improving, which is a positive."
Australia lost their opener to England before their clash with New Zealand was rained off, meaning they sit bottom of the group with one point knowing defeat at the Oval on Monday will knock them out of the tournament.
Clarke's recurring back trouble has led to speculation he could be a doubt for some of the five-Test Ashes series in England which starts at Trent Bridge on July 10.
"Yes I'm confident (of playing in all of the Ashes), but I was confident I'd play every game in this series so you are asking the wrong guy," he said.
England have their own injury worries for the Ashes with their most dangerous attacking batsman Kevin Pietersen missing the Champions Trophy because of a knee problem.
Pietersen told a fan on Twitter on Sunday that he would return to county four-day action for Surrey against Yorkshire on Friday.
Australia will be without batsman David Warner against Sri Lanka after he was banned until the first Ashes Test for punching England player Joe Root in a bar.
Clarke said the squad had now moved on.
"The feeling in the camp has obviously been a little bit different...because of a little bit of disappointment in one of our players," he said. "We left it there as a team and we look forward."