A spell of four wickets for the loss of just six runs and a nail-biting late partnership helped Pakistan set up a semi-final clash with England in the Champions Trophy after a roller coaster affair in Cardiff.
Junaid and Amir limit Sri Lanka total
With both sides requiring victory to progress, Sri Lanka made a relatively comfortable start after being put into bat. Despite Danushka Gunathilaka falling victim to Junaid Khan in the early stages, tournament star Niroshan Dickwella and Kusal Mendis were able to steady the ship as the underdogs looked well set at 82-1.
However, the loss of two wickets within three balls threatened to derail their attempt to post a high score as Mendis fell for 27 and Dinesh Chandimal followed him just minutes later without scoring.
Yet Sri Lanka responded as Dickwella and Angelo Mathews combined to counter-attack with a timely partnership of 78. With 300 now looking a reasonable target, Pakistan were desperate to find a breakthrough and it was premier bowler Mohammad Amir who came up with the goods, beating Mathews for pace as he dismissed the Sri Lankan captain for 39.
That moment sparked four successive overs where Pakistan picked up as many wickets for the loss of just six runs. The dangerous Dickwella departed for 73 as the middle-order collapsed at the feet of Amir and Junaid, leaving Sri Lanka now struggling at 167-7.
Mathews' side briefly regathered as Asela Gunaratne and Suranga Lakmal forged an important partnership of 46. Hasan Ali eventually caused the downfall of both as Sri Lanka posted a modest total of 236 after being bowled out in the final over.
Sarfraz leads his team to victory after regular wickets
Pakistan looked well set to pick off the target and progress with ease, particularly as Azhar Ali and Fakhar Zaman built a telling partnership based on precision placement and quick running between the wickets.
In a partnership of 74 off just 68 deliveries, Zaman had looked the more composed with nine boundaries that took him to 50 off just 36 deliveries, whilst Azhar lingered with a strike rate of 68 after taking 15 balls to get off the mark. Yet it was Zaman who was subject to a Sri Lanka breakthrough as Nuwan Pradeep picked up the first of his three wickets.
At that point, there was no reason for Pakistan to panic but as Sri Lanka's bowling attack, spearheaded by Pradeep, built their confidence wickets began to fall at regular intervals. Partnerships of 18, 3, 15, 21 and 6 left Sarfraz Ahmed's side in a challenging position at 137-6, still 100 runs from their target.
Yet the captain was able to ignore what had proceeded his entrance and when Fahim Ashraf was run out at 162-7, he managed to lead his team to victory with a patient, if somewhat nervy, spell at the crease. Excellently supported by Amir who made an unbeaten 28, Sarfraz built a steady 61 off 79 despite being dropped twice off the bowling of Lasith Malinga.
The pair put on the highest eighth-wicket stand of the tournament with 75 as they picked off the total with 31 balls to spare. Meanwhile, Malinga was wondering what could have been as the dropped catches left him with just one wicket in probably his last tournament ODI for Sri Lanka.