There was more extravagant celebration when Dimuth Karunaratne (23) gave some catching practice to Mangal in the slips. This time Hassan got down on one knee and looked skyward with his arms splayed.
It was a great moment for the Afghans but experienced campaigner Jayawardene and the skipper Angelo Mathews gradually rebuilt the innings.
The pair added 126 runs in a crucial partnership.
Jayawardene went on to post his 19 ODI hundred. He worked the ball of his hip for a single to bring up the milestone.
The Sri Lankan section of the crowd greeted his ton with a not-so raucous round of song.
They had been silenced when Mathews had been run out for 44 moments earlier. When Jayawardene guided a catch to third man shortly after, the match appeared to have another twist waiting.
There was no further calamity for Sri Lanka. Thisara Perera and Jeeven Mendis held their nerve. Perera played a clutch innings, whacking an undefeated 47 from 26 deliveries.
The outcome may well have been different had Afghanistan been able to capitalise on a very useful opening 35 overs.
It was well-placed at 169 for four and a score of 300 was within reach.
But the second batting power player proved decisive, however not for the batting side. Afghanistan netted just 10 runs and it cost the princely sum of two wickets.
The turning point came when Sri Lankan kingpin Lasith Malinga beat the swinging bat of Mohammad Nabi.
The last 10 overs were only a marginal improvement.
They yielded more wickets, dots and singles than fours or sixes. Ultimately that was the difference between the two teams.
Afghanistan's next assignment is against Scotland in Dunedin on Thursday and Sri Lanka play Bangladesh in Melbourne on the same day.
Commentary
Scoreboard
Manhattan/Worm
Wagonwheel
For more coverage of the Cricket World Cup from nzherald.co.nz and NZME check out #CricketFever.