Babar scored 474 runs in the group stage, a record by a Pakistan batter at a single edition of the World Cup.
London: Pakistan's Cricket World Cup hopes are over. After winning the toss and finishing on 315-9 in 50 overs on Friday, Pakistan needed to dismiss Bangladesh in their last group-stage match for an improbable seven runs or less to overtake fourth-place New Zealand and reach the semifinals.
Bangladesh reached 8-0 in the 2nd over at Lord's. New Zealand joined Australia, India and England in the last four.
The huge score Pakistan required looked unlikely despite a 100-ball 100 from opener Imam-ul-Haq, who was out in rare fashion by hitting his own wicket two balls after reaching his maiden World Cup century.
Number three Babar Azam hit 96 in 98 deliveries, including 11 boundaries, four more than Imam.
Pakistan captain Sarfaraz Ahmed retired hurt on 2 but bravely returned for the last ball of the innings and hit a single to deny Mustafizur Rahman his hat trick.
Babar was denied his second century of the tournament when he fell to a yorker from Mohammad Saifuddin that trapped him lbw. He failed with his review and it left Pakistan at 180-2 after 32 overs.
Babar scored 474 runs in the group stage, a record by a Pakistan batter at a single edition of the World Cup. He came into the game needing 60 to overtake Javed Miandad's 437 total in 1992.
Mustafizur finished with 5-75 off 10 overs.