Pakistan won by 4 wickets with 10 balls remaining. England won the series 4-1.
PAKISTAN INNINGS; TARGET 303
Over 48.2 || Score 304/6 (Mohammad Rizwan 34; Imad Wasim 16)
Finally, Pakistan win a match in the ODI series, with Wales-born Imad Wasim scoring the winning runs. A four off the second ball in the penultimate over, bowled by Chris Jordan.
Wasim and Mohammad Rizwan hung tight in the closing stage of the match, and notched up an unbeaten 38-run stand for the seventh wicket.
Over 45 || Score 279/6 (Mohammad Rizwan 21; Imad Wasim 4)
A wicket-maiden from from David Willey made Pakistan's cause even more difficult. That happened in the 43rd over.
A direct hit from wicket-keeper Jonny Bairstow to send back Mohammad Nawaz.
WICKET: Mohammad Nawaz run out 2 (3b)
And suddenly the target look difficult for Pakistan, even after that massive fourth-wicket stand between Sarfraz Ahmed and Shoaib Malik.
In the last five over Pakistan added another 23 runs, losing 1 wicket.
They still need another 24 runs from the last 30 balls of the innings.
For England, rookie spinner Liam Dawson's been expensive but his two wickets will have a major bearing on the fate of the match.
Over 40 || Score 256/5 (Mohammad Rizwan 4; Mohammad Nawaz 0)
Brilliant bowling change from England skipper Eoin Morgan. Brought in Liam Dawson, and the slow left arm spinner provided the all-important breakthrough, removing Sarfraz Ahmed.
The Pakistan batsman tried to cart over the mid-on, but ended up offering a catch to Alex Hales, who completed it despite covering some grounds.
WICKET: Sarfraz Ahmed c Alex Hales b Liam Dawson 90 (73b)
That happened off the fourth ball of the 38th over. With that a massive 163-run stand was broken.
Mohammad Rizwan joined Shoaib Malik in the centre.
By continuing to take risk against spinners, Pakistan allowed England to claw back in the match. Just after hitting a massive six over bowler's head, Malik tried another, but this time, ended up losing his wicket. Caught at mid-off by Jason Roy.
WICKET: Shoaib Malik c Jason Roy b Liam Dawson 77 (80b)
And in the last five overs, Pakistan have scored 28 runs losing two wickets, including 12 from the 40th over, bowled by Dawson.
Pakistan need another 47 runs from 60 balls. Mohammad Nawaz is the new man.
Over 36 || Score 230/3 (Sarfraz Ahmed 81; Shoaib Malik 62)
Sarfraz Ahmed and Shoaib Malik posted a 150-run stand for Pakistan as the visitors finally look like winning a match in the ODI series.
They need 73 runs from 14 overs.
Over 30 || Score 186/3 (Sarfraz Ahmed 55; Shoaib Malik 51)
Brilliant display of ODI batting from both Sarfraz Ahmed and Shoaib Malik as Pakistan took a decisive hold into the match.
Both the batsmen have reached their respective fifties. They have put up 109 runs for the fourth-wicket stand, in 16.1 overs.
In the last five overs, they have score 37 runs. Pakistan still need another 117 runs from 20 overs. Well under 6.
Over 25 || Score 149/3 (Sarfraz Ahmed 43; Shoaib Malik 26)
4, 7, 6, 11, 8: This is how Pakistan scored in the last five overs with Sarfraz Ahmed leading the charge.
In these middle overs, Pakistan have certainly wrested back the initiatives from England. The fourth-wicket partnership between Sarfraz and Shoaid has seemingly stalled England's bid for a series whitewash.
Over 20 || Score 113/3 (Sarfraz Ahmed 16; Shoaib Malik 19)
In the last five overs, Pakistan score 32 runs without losing further wicket. Sarfraz Ahmed and Shoaib Malik have steadied Pakistan's innings.
Pakistan still need another 190 runs from 30 overs.
Over 15 || Score 79/3 (Sarfraz Ahmed 1; Shoaib Malik 1)
A double-wicket over from Mark Wood has put a stupor to Pakistan's chase.
In the 14th over, Wood accounted for the wickets of Babar Azam and Azhar Ali – both settled batsmen.
Babar was bowled, off the third ball, then Azhar perished, caught behind off the fifth ball.
WICKET: Babar Azam b Mark Wood 31 (29b)
WICKET: Azhar Ali c Jonny Bairstow b Mark Wood 33 (37b)
Sarfraz Ahmed and Shoaib Malik are the new men for Pakistan. They need another 224 runs from 35 overs.
Over 10 || Score 64/1 (Azhar Ali 23; Babar Azam 29)
The arrival of Babar Azam has given Pakistan a new lease of life, scoring freely and more importantly, the confidence.
In the last five overs, Pakistan have scored 42 runs, at a rate of 8.40.
In the ninth over, bowled by Chris Woakes, Pakistan scored 13 runs with three fours — two by Azhar Ali, and one by Babar.
Azhar and Babar have added 42 runs in 5.1 overs for the second wicket stand. And they still need another 239 runs from 40 overs.
Over 5 || Score 22/1 (Azhar Ali 11; Babar Azam 0)
Steady start to Pakistan's chase of 303-run target. Azhar Ali and his opening partner Sharjeel Khan have added 22 runs runs for the first wicket, without taking too many risks.
For England, Chris Woakes and David Willey operated in tandem. Willey's figures slightly better, thanks to a maiden, bowled to Sharjeel, in the second over of the innings.
But Khan perished to Woakes, off the fifth ball of fifth over. Caught at mid-on by Mark Wood. A lame shot for an opener. Simple scoop.
WICKET: Sharjeel Khan c Mark Wood b Chris Woakes 10 (16b)
Babar Azam joined his skipper in the centre.
Jason Roy and Ben Stokes both struck quickfire fifties as England made 302 for nine at Cardiff.
Roy made 87 and Stokes an ODI-best 75 as England, bidding for a first 5-0 clean sweep of a home one-day series, set Pakistan a challenging total to chase.
At 244 for five England -- who posted a world record 444 for three in the third ODI in Nottingham -- were set for another huge score.
But Pakistan pegged them back with paceman Hasan Ali taking an ODI best four for 60 and left-arm quick Mohammad Amir three for 50.
Over 50 || Score 302/9 (Jordan 15; Wood 8)
Hasan Ali got his fourth wicket, but England managed to cross the 300-run mark as Chris Jordan hung on there to finish with a flourish.
Hasan got David Willey's wicket off the first ball of the 49th over, caught at deep square leg by Mohammad Nawaz.
WICKET: David Willey Mohammad Nawaz b Hasan Ali 6 (15b)
Jordan hit the second ball of the last over for a six. A dot ball, then a double as England reached 300.
Ali was Pakistan's most successful bowler. His figures are 10-0-60-4. But it was Imad Wasim, who curbed the scoring rate with his 10 overs. He conceded only 33 runs, and also taking a wicket.
Over 45 || Score 275/8 (Willey 2; Jordan 1)
England lost momentum towards the end of their innings with Pakistan taking three quick wickets.
Hasan Ali returned to removed Chris Woakes in the 44th over, then Mohammad Amir took care of Liam Dawson in the next over.
WICKET: Chris Woakes b Hasan Ali 10 (8b)
Woakes, known for his hitting prowess, hit the first ball of the 44th over for a four, then lost the stumps the very next delivery. Wicket to Ali.
Then, Mohammard Amir got rid of Liam Dawson, who was bidding his time to launch. Caught at mid-wicket.
WICKET: Liam Dawson c Umar Gul b Mohammad Amir 10 (13b)
That happened off the fourth ball of the over.
Both Ali and Amir have three wickets each.
David Willey and Chris Jordan are in the centre, and both can swing.
Over 42 || Score 260/6 (Dawson 7; Woakes 2)
Huge wicket for Pakistan. Hasan Ali removed dangerous Ben Stokes, caught at short fine leg by Umar Gul.
WICKET: Ben Stokes c Umar Gul b Hasan Ali 75 (76b)
That happened off the fourth ball of the 42nd over. With that a quick 39-run stand also ended.
Chris Woakes joined Liam Dawson in the centre, as England continued to push for 300.
Over 40 || Score 244/5 (Stokes 65; Dawson 3)
One massive over and England moved closer to 250-run mark. Ben Stokes milked Umar Gul's eight over for 17 runs, which included a four and six, and lots of singles.
The previous over, bowled by Imad Wasim, resulted in six runs. And in these two overs, England have added 23 runs.
Over 38 || Score 221/5 (Stokes 46; Dawson 1)
The partnership between Ben Stokes and Jonny Bairstow broken with Umar Gul removing the later in the 38th over.
WICKET: Jonny Bairstow c Mohammad Rizwan b Umar Gul 33 (36b)
Bairstow picked up the short ball, and tried to ramp it down the third man. But he ended up offering an easy catch at backward point, taken by Mohammad Rizwan. That happened off the fourth ball of the over.
Liam Dawson is the new man, and he will now play second fiddle, expectedly, to Stokes.
Over 35 || Score 206/4 (Stokes 41; Bairstow 24)
A good over from Imad Wasim, only three runs off the 35th over. But Pakistan have conceded fresh grounds to England with Ben Stokes Jonny Bairstow scoring at will.
The previous over resulted in 10 runs, with Stokes hitting back-to-back fours off Hasan Ali, at the start , and thus they moved past 200-run mark.
Over 32 || Score 187/4 (Stokes 35; Bairstow 11)
In the last five overs, England have scored 25 runs, losing the wicket of Jason Roy.
Ben Stokes and Jonny Bairstow have put together 20+ runs for the fifth wicket stand.
For Pakistan, Mohammad Amir completed seven overs, taking two wicket in exchange of 38 runs.
Over 28 || Score 166/4 (Stokes 24; Bairstow 2)
Mohammad Ami returned to give Pakistan the much needed break. The left arm fast bowler removed Jason Roy, thanks to a top edge which ended as a catch for Hasan Ali at deep square leg.
WICKET: Jason Roy c Hasan Ali b Mohammad Amir 87 (89b)
That happened off the third ball of 28th over. Roy and Ben Stokes have posted a 72-run stand for the fourth wicket.
England have slightly increased their scoring rate with Stokes finally opening up, but just then they lost Roy, who was looking for his fourth ODI ton.
New man for England in the centre is Jonny Bairstow.
Over 25 || Score 146/3 (Roy 84; Stokes 9)
In the last five overs, England have managed to score only 20 runs. Jason Roy, howeverm increased the tempo on individual level and moved into the eighties. He also hit Shoaib Malik for a six in the 24th over.
He and Ben Stokes have posted a 50+ run stand for the fourth wicket.
For Pakistan, Iamd Wasim continued to impress with his slow, left-arm spin. He has conceded 16 runs only in six overs.
Over 20 || Score 126/3 (Roy 68; Stokes 6)
Mohammad Amir returned for Pakistan and was pivotal in giving his team and early breakthrough. But England got their opener Jason Roy batting beautifully, and he has since steadied the ship.
For Pakistan, Imad Wasim has so far been the most impressive bowler. He got the wicket of Eoin Morgan. Hasan Ali accounted for Alex Hales' wicket.
England: Jason Roy, Alex Hales, Joe Root, Eoin Morgan (capt), Jonny Bairstow (wkt), Ben Stokes, Liam Dawson, Chris Woakes, David Willey, Chris Jordan, Mark Wood
Pakistan: Sharjeel Khan,Azhar Ali (capt), Shoaib Malik, Babar Azam, Sarfraz Ahmed (wkt), Mohammad Rizwan, Mohammad Nawaz, Imad Wasim, Umar Gul, Hasan Ali, Mohammad Amir
Earlier, Pakistan captain Azhar Ali won the toss and elected to field in the fifth and final one-day international against England in Cardiff.
England, 4-0 up and bidding for a first home 5-0 series whitewash, made three changes to the side that won by four wickets at Headingley on Thursday.
They gave an ODI debut to Hampshire left-arm spinner Liam Dawson, with specialist slow bowlers Moeen Ali and Adil Rashid both rested.
Pacemen Chris Woakes and Mark Wood returned, with fast bowler Liam Plunkett also rested from this match in the Welsh capital.
Pakistan made two changes, left-arm quick Mohammad Amir returning after giant quick Mohammad Irfan was ruled out of the rest of the tour after cramping up at Headingley, and all-rounder Shoaib Malik replacing top-order batsman Sami Aslam.
The Pakistan team also featured all-rounder Imad Wasim, born in the south Wales town of Swansea.
The pressure is on Pakistan to avoid a 5-0 whitewash against England, who have been the better team in all departments of the game throughout the limited-overs series.
After a brilliant show in Tests, Pakistan failed to carry the momentum in ODIs and it would be a great achievement for Eoin Morgan and his men if they win the last match of the series as well.
After being crushed by 169 runs in the third ODI, Pakistani bowlers did show some improvement in the next game where they had reduced hosts to 4/72 at one stage. But the visitors failed to capitalise from there as Ben Stokes (69), Jonny Bairstow (61) and Moeen Ali (45) chipped in with significant knocks to turn the match in England's favour.
Skipper Azhar Ali silenced critics to an extent with this brilliant 80-run knock in the previous match. Pakistan will need a similar effort from their skipper in the final ODI as well.
Mohammad Amir is likely to make a comeback for the match where he will replace Mohammad Irfan, who suffered cramps after bowling five overs in the fourth ODI.
New Delhi: Welcome to our live coverage of 5th ODI match between England and Pakistan, being played at Sophia Gardens.