Afterwards Ponting told BBC Sport: "If you're a little bit off in this game, you pay for it.
"Now we have to move on as quickly as possible and focus on the Ashes."
Australia had their moments in this match, but their specialist batting and their seam bowling was again a major let-down, and that is bound to concern Ponting.
During the early exchanges, Shane Watson hit debutant Isuru Udana for two fours and a six, then Ricky Ponting took advantage of a wayward opening over from Lasith Malinga, taking him for three fours.
That left Australia in good shape at 47-1 from just five overs. But they scored at just half that pace over the following 10 overs while losing five more wickets.
Sangakkara kept shuffling his bowlers around, but it was Mendis who did most of the damage.
Ponting admits 'too many mistakes'
Ponting was bowled as he backed away to leg, Watson was lbw on the sweep and David Hussey also fell lbw as Mendis's unusual spin-bowling wreaked havoc.
But Australia were then helped by two big overs. Johnson climbed into Muttiah Muralitharan's final set of six, hitting him for two sixes and a four.
Udana's final over included the wicket of David Hussey, but it also cost 18 - including a four and a six off the bat of Brett Lee.
And although two more wickets fell in the final over, bowled by Malinga, Australia's tailenders somehow scrambled 12 more runs off it with two lucky deflections for four.
So despite being in terrible trouble at 94-6 after 15 overs, a haul of 65 runs from the last five had hauled them back into the contest at the halfway stage.
Johnson ended up with 28 not out off just 13 balls, a contribution that gave him and his fellow bowlers a bit of momentum as Sri Lanka's chase started.
However, Sri Lanka's batsman took the initiative back again, despite losing Sanath Jayasuriya to a fine David Warner catch at deep square-leg.
Dilshan (53) was in a hurry, cutting, pulling and driving the seamers - almost at will - and Sangakkara.
He gave Watson plenty of grief, but was finally undone by Clarke's first delivery, which turned and trimmed his bails.
That left Mahela Jayawardene to continue the fight with Sangakkara (55 not out), but the pair were made to work for their singles as they dealt with Clarke and the other spinner Nathan Hauritz.
Just as had happened with Australia's innings, the runs dried up alarmingly, and from having needed barely seven an over the required rate went up to nine, with the out-of-sorts Jayawardene holing out off Hauritz into the bargain.
Sangakarra praises 'close unit'
That was the cue for Sangakkara to hoist Hauritz for two effortless sixes, one swept the other driven straight, as though to demonstrate he had been toying with the Sri Lankan fans all along.
He remained coolness personified, sweeping Nathan Bracken past the short fine-leg for four more to reach his fifty.
Jehan Mubarak's six in the penultimate over off Lee - who again proved so expensive - eased the tension completely.
And it was a tame way for Australia to go out of the tournament when Johnson slid one down the leg-side.
A delighted Sangakkara said: "It was a great performance. When you play against Australia the key is to believe you can win.
"Our strength has always been spin bowling and we played two guys whom the Australians haven't seen much of. So their batsmen couldn't really target one single bowler."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.