Hosts Bangladesh crawled into the main draw of the World Twenty20 despite an embarrassing two-wicket defeat by Hong Kong in their final qualifying match in Chittagong on Thursday.
Skittled out for a paltry 108 in 16.3 overs, Bangladesh risked losing the super 10 stage berth to Nepal if Hong Kong could chase down the target in 13.1 overs.
Their bowlers, however, ensured Bangladesh stayed afloat in the tournament but could not stop associate nation Hong Kong from achieving a memorable victory over their test playing rivals with two balls to spare.
Bangladesh now join three former champions - India, Pakistan and West Indies - and Australia in Group Two where such sloppy play would invite humiliation.
Put into bat, Bangladesh lost two wickets in the first over before Shakib Al Hasan (34) and Anamul Haq (26) steadied the ship. Cheered on by their passionate fans, the home side cruised to 85-3 in the 11th over before their spectacular collapse at the Zahur Ahmed Chowdhury Stadium.
For Hong Kong, Nadeem Ahmed (4-21) and Nizakat Khan (3-19) wreaked havoc as Bangladesh folded for a below-par score.
Hong Kong's inexperience showed in their wobbly chase but Munir Dar (36) plundered 15 runs off a Farhad Reza over to turn the match on its head and Haseeb Amjad hit a six to score the winning run for them.
Earlier, Nepal upset Afghanistan by nine runs in another Group A match for their second victory in the qualifiers.
Put into bat, Subash Khakurel (56) and Sharad Vesawkar (37) helped Nepal to a competitive 141-5 before they returned to restrict Afghanistan to 132-8.