Shaheen Afridi (c) was the star of the show for Pakistan against Bangladesh. Photo: Paul Childs/Reuters

LONDON  Teenage fast bowler Shaheen Afridi took six cheap wickets as Pakistan beat Bangladesh by 94 runs at Lord's on Friday, 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 up just 35 runs in the process - the best figures for a Pakistan bowler in the competition.

"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.

Despite the win for Pakistan, the team's poor net run rate meant the 1992 champions had no real chance of pipping New Zealand to the last semi-final slot.

"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.