Sarfraz Ahmed and Shoaib Malik's sublime 163-run partnership proved crucial as Pakistan avoided a series whitewash with a four-wicket victory over England in Sunday's fifth one-day international.
It has been a series to forget for Pakistan, but they finished on a high in Cardiff as Sarfraz went on the attack with a 73-ball 90, flanked brilliantly by Shoaib (77).
England did break the partnership eventually and a couple of quick wickets ensured a nervy ending was in store for Pakistan, but the hosts' hopes of just a second ODI whitewash in a series of five or more matches were to be denied.
Earlier, Jason Roy (87) and Ben Stokes, whose 75 represented his highest ODI knock, had helped England scramble to 302-9.
That score may have been higher had Alex Hales (23) built on a quick start that saw him hit five boundaries off 15 balls before mishitting a Mohammad Amir delivery to Shoaib at mid-on.
Joe Root (9) and Eoin Morgan (10) gave away cheap wickets, and Roy and Stokes had to withstand a going over from the Pakistan spinners.
The duo stood firm and Roy brought up his 50 with a top-edge reverse-sweep and he shifting through the gears by twice smacking Shoaib for straight sixes before an ill-judged pull off Amir to deep square leg ended his chances of a century and a 72-run stand with Stokes.
Stokes' knock was mature, if somewhat nervy, and partnerships of 55 and 39 with Jonny Bairstow (33) and Liam Dawson (10) helped boost England's tally.
Chris Woakes snared Sharjeel Khan (10) early in Pakistan's reply and Mark Wood struck twice in the 14th over to claim Babar Azam (31) and Azhar Ali (33).
Sarfraz and Shoaib led the recovery, though, with the former enjoying particular joy against England ODI debutant Liam Dawson - smacking the spinning all-rounder to the ropes four times.
One of the moments of the match came when Sarfraz blasted Woakes over deep midwicket for six where a spectator in the crowd took a superb one-handed catch over the advertising hoardings - earning him a free trip to Australia.
Sarfraz's swashbuckling knock finally came to an end when Dawson held his nerve with a loftier one that Hales cupped at mid-on - the wicketkeeper-batsman left with the consolation of ending the series as highest run scorer.
Shoaib tried to continue the momentum with a mammoth six off Dawson down the ground, but was gone next ball trying to repeat the trick and succeeding only in picking out Roy.
Pakistan feared the worse when Mohammad Nawaz (2) was run out shortly after, but Mohammad Rizwan (34) and Imad Wasim (16) steered them over the line with 10 balls to spare.