Former champions faced a near-impossible task of securing a win by more than 300 runs to reach the semi-finals.

Teenage fast-bowler Shaheen Afridi took six wickets as Pakistan beat Bangladesh by 94 runs at Lord’s, clocking up their fourth World Cup win in a row but narrowly missing out on the semi-finals.

The 19-year-old became the youngest bowler to take six wickets in the history of the tournament, and gave away just 35 runs in the process – the best figures for a Pakistan bowler in the competition.

Pakistan finished in fifth place on 11 points, the same as fourth-placed New Zealand. Both teams had five wins. The win, however, was not enough to take Pakistan through to the last-four: After putting 315 on the board, the 1992 winners needed to bowl Bangladesh out for under eight to edge past New Zealand on net runrate.

“The way Shaheen is bowling, the consistency is amazing. One of the best bowling performances I’ve ever seen,” Pakistan captain Sarfaraz Ahmed said.

Earlier in the day, Pakistan opener Imam-ul-Haq made a run-a-ball century and Babar Azam scored 96 as they set the Bangladeshis a target of 316 runs.

Bangladesh’s Shakib Al Hasan scored his seventh half-century of the tournament, equalling Sachin Tendulkar’s record of 2003, before slashing wildly at a ball from Shaheen and being caught behind for 64.

That knock made Shakib the highest-scoring batsman of the World Cup with 606 runs, but Bangladesh’s other wickets fell regularly as they were skittled out in 44 overs.

“I want to say sorry for Shakib. If we stepped up, the tournament could’ve been different,” Bangladesh captain Mashrafe Mortaza told reporters.

Shakib Al Hasan at #CWC19 👉 606 runs

👉 11 wickets TAKE A BOW 👏 pic.twitter.com/iaKyVPRUBO — ICC (@ICC) July 5, 2019

“We played good cricket but haven’t qualified. That one game against West Indies cost us the tournament,” Sarfaraz said, referring to their crushing opening loss.

“We have two months off and we need to do a lot of work with the team,” he added.

New Zealand joined Australia, India and England in the last four.

Bangladesh’s Mustafizur Rahman returned 5-75 to move to 20 wickets, four behind tournament leader Mitchell Starc.

Babar scored 474 runs in the group stage, a record by a Pakistan batter at a single World Cup. He came into the game needing 60 to overtake Javed Miandad’s 437 total in 1992.