Bangladesh 282 for 7 (Santo 90, Shakib 82, Madushanka 3-69) beat Sri Lanka 279 (Asalanka 108, Tanzim Hasan 3-80) by 3 wickets
New Delhi: Bangladesh's three-wicket win over Sri Lanka was overshadowed by Angelo Mathews' controversial timed out dismissal in Delhi.
The former Sri Lanka skipper became the first international cricketer to be given out timed out.
Mathews protested that an issue with his helmet prevented him from being in position to face up to his first ball within the required two minutes of the previous wicket, but much to his and Sri Lanka's astonishment, the wicket stood.
That left Sri Lanka 135-5 but a superb century from Charith Asalanka took them up to 279 all out.
Batting conditions improved under lights and Bangladesh made light work of the chase with Najmul Hossain Shanto and Shakib Al Hasan putting on 169 for the third wicket.
Both were dismissed short of their centuries by a fired-up Mathews, who sent Shakib on his way with a tap of his wrist, but despite a late wobble, the Tigers got over the line with 53 balls to spare.
With Bangladesh already eliminated and Sri Lanka needing a miracle to progress, Champions Trophy qualification was set to be the focus of a match that went ahead despite poor air quality in the Indian capital.
However, that all changed two balls into the 25th over of the Sri Lanka innings when Mathews walked out following Sadeera Samarawickrama's dismissal.
Under the International Cricket Council's rules for the World Cup, a batter must be ready to face the next ball within two minutes of the previous dismissal and, while cutting it fine, there was no suggestion of a problem before the chinstrap on Mathews' helmet snapped as he attempted to tighten it.
When he called for a replacement, causing a delay, Bangladesh captain Shakib appealed and a furious Mathews was eventually given out.
While Sri Lanka's players and coaches raged off the field, Asalanka kept his cool on it, taking his frustrations out on the bowlers to reach his second one-day international century.
He fell for 108 from 105 balls in the penultimate over of the innings as Sri Lanka were bowled out with three balls left unused.
Left-arm seamer Dilshan Madushanka removed openers Tanzid Hasan and Liton Das early in the Bangladesh chase but Shakib was dropped on seven off the bowling of Mathews and it proved costly.
He and Shanto started steadily but the boundaries were soon flowing and Sri Lanka, still seething at a perceived injustice, had no answers.
Mathews gave them hope when he ousted both set batters in quick succession and they proceeded to take another three wickets before Bangladesh sealed the win in the 42nd over.
Defeat confirms Sri Lanka's elimination from semi-final contention on the day in which the country's sports minister Roshan Ranasinghe sacked the national cricket board following their humiliating loss by India in their last game.