Aware that the situation demanded them to beat Bangladesh by 300-plus runs to make it to the knockout stage, Pakistan needed to put on board a total of no less than 450 to stand a chance.
All they could manage was 315 for nine after electing to bat, courtesy Imam-ul-Haq (100) and Babar Azam (96), who added 157 runs for the second wicket.
Pakistan bowled out Bangladesh for 221 in 44.1 overs to record their fourth win on the trot since suffering defeat at the hands of arch-rivals India.
Shaheen Afridi returned career-best figures of six for 35 and became the youngest player to take a five-wicket haul in World Cup.
Shakib Al Hasan's incredible run at this World Cup culminated with a 64-run knock. He totalled 606 runs with an average of 86.57.