Sri Lanka held their nerve to edge a two-run win over Afghanistan and qualify for the Asia Cup Super 4 stage on Tuesday.
Sri Lanka batted first and posted 291-8. The Afghans not only had to win, but do so inside 37.1 overs in order to improve their net run rate and join Bangladesh in the next round.
The chase was set up brilliantly by Afghanistan's middle order, with captain Hashmatullah Shahidi (59) and veteran Mohammad Nabi (65 from 32 balls) hitting fine fifties. They kept losing wickets but maintained the required run rate for qualification.
After 36 overs, Afghanistan were 277-8, with 15 runs needed from seven balls for qualification. Rashid Khan hit three fours off Dunith Wellalage to bring the equation to three needed off one ball.
They lost a wicket off the first ball of the 38th over, but Afghanistan still had another shot at qualification. They now needed to level the score and then hit a four in the next two balls or hit a six before 38.1 overs to improve their net run rate sufficiently.
However, the batsmen in the middle were apparently not aware of the new lifeline as last man Fazalhaq Farooqi blocked his first two balls before being dismissed lbw off the third. Afghanistan, who had qualification within reach, were bowled out for 289 in 37.4 overs and lost by two runs.
Earlier, Kusal Mendis missed a century but still guided Sri Lanka to 291-8.
The 28-year-old hit an 84-ball 92 that included three sixes and six boundaries to anchor the Sri Lankan innings after they won the toss and batted at the Gaddafi Stadium.
Sri Lanka were off to a solid start of 63 for the first wicket between Pathum Nissanka (41) and Dimuth Karunaratne (32).
Mendis took over and added 102 for the fourth wicket with Charith Asalanka, who made a 43-ball 36.
But from 186-3 Sri Lanka had a middle-order stutter that saw them lose four wickets in the space of 41 runs, including that of Mendis who was run out.