New Zealand are guaranteed the last Cricket World Cup semi-final spot after Pakistan's faint hopes were ended at Lord's on Friday.
The ICC Champions Trophy holders needed to beat Bangladesh by a record ODI total of over 300 runs in their final group match, but could only post 315-9.
Bangladesh then made the necessary eight runs to eliminate Pakistan without reply inside two overs, aided by an awful Haris Sohail catch attempt from Soumya Sarkar's edge.
Pakistan can match the Black Caps' tally of 11 points by beating the Tigers, yet they will bow out on net run-rate.
Imam-ul-Haq made 100 off as many balls and Babar Azam (96) broke Javed Miandad's record of 437 runs in a single World Cup after Sarfraz Ahmed won the toss.
Those brilliant knocks were in vain, though, and New Zealand will take on Australia or India in the last four next week.
Sarfraz also suffered pain when he was struck on the elbow by a straight drive from Imad Wasim, forcing the Pakistan captain to retire hurt with five overs remaining.
He returned for the final ball of the innings, however, and was keeping as his side were knocked out early in the Bangladesh innings.