Ben Stokes hit 71 not out after a middle-order collapse as England beat Pakistan by three wickets with three balls to spare in the 4th ODI at Trent Bridge. The win saw England secure the series at 3-0 up with one to play.
England were cruising to a target of 341 at 201 for one when Jason Roy's dismissal for 114 sparked a collapse.
And when Moeen Ali was out for a duck, England had slumped to 216 for five.
But Stokes steadied the ship and Tom Curran got England back on track in a seventh-wicket stand of 61.
Curran had already taken four for 75 in Pakistan's 340-7. But when he was yorked by Hasan Ali, England still needed 22 off 16 balls.
Stokes got the target down to 10 runs off 10 balls when he carved a six off Junaid Khan. Adil Rashid's edged four past Sarfraz Ahmed left England requiring three off the last over to win. Stokes finished the job with a single.
Roy, dropped on 25 by Fakhar Zaman, and James Vince (43) put on 94 for the first-wicket partnership.
Roy reached his eighth ODI hundred in 75 balls. But the 28-year-old couldn't see England home, gloving a hook off Hasnain to Sarfraz. Joe Root (36) then edged Imad Wasim to short third man.
England's 208-3 soon became 208-4 when stand-in captain Jos Buttler fell for a duck when he miscued a sweep off Imad to Hafeez at short fine leg.
Moeen Ali was also out for a duck, top-edging a sweep off Shoaib Malik with Fakhar Zaman, running back from mid-on, holding a tough catch.
Much of Pakistan's fielding was sloppy but left-arm quick Junaid reduced England to 258 for six off 40 overs with a superb right-handed caught and bowled off a slower delivery to dismiss Joe Denly (17).
Earlier, Pakistan's innings fell apart following a century stand between Babar Azam (115) and Hafeez (59).
Pakistan suffered a setback when Imam-ul-Haq had to retire hurt on three after missing an intended pull off Mark Wood that hit him on the elbow but X-rays showed no fracture.
The fifth and final ODI of the series will be played in Leeds on Sunday.