Ben Stokes's unbeaten 71 rescued England from a top-order collapse as the World Cup hosts and favourites beat Pakistan by three wickets with three balls to spare at Trent Bridge.
Friday's win in a floodlit match saw England secure the series at 3-0 up with one to play, but it was far from routine.
England were cruising to a target of 341 at 201 for one when Jason Roy's dismissal for 114 sparked a collapse that saw three wickets lost for seven runs in 10 balls.
And when Moeen Ali was out for a duck, England were 216 for five. But Stokes steadied the ship and with No 8 Tom Curran (31) got England back on track in a stand of 61.
Curran, pushing for a place in England's final 15-man World Cup squad, had already taken four for 75 in Pakistan's 340 for seven.
This was a modest score at Trent Bridge, where England have twice set the record for the highest one-day international total, with last year's 481 for six against Australia following their 444 for three against Pakistan in 2016.
"We got there in the end," man-of-the-match Roy told Sky Sports. "I knew we had a big total on the board and I got out and I knew the job wasn't done so I was very frustrated. "But then the boys came in and finished it off extremely well."
Jos Buttler, captaining England after regular skipper Eoin Morgan was given a one-game ban for a slow over-rate following Tuesday's six-wicket win in Bristol, was pleased by the way the world's number one-ranked ODI side had got out of a tight spot.
Pakistan captain Safraz Ahmed was once again left lamenting his side's sloppy fielding. "It was definitely tough luck for us after we put runs on the board," he said. "But unfortunately our bowling execution was not up to the mark and we didn't field well."
Roy, missed on 25 by Fakhar Zaman, reached his eighth ODI hundred in style, with fourth six in 75 balls faced, by lofting off-spinner Mohammad Hafeez over extra-cover
Earlier, Pakistan failed to capitalise on Babar Azam's hundred.
Their innings fell away following a century stand between Babar, who made 115, and Hafeez (59).
Pakistan suffered a setback when Imam-ul-Haq, fresh from his career-best 151 at Bristol, had to retire hurt on three after missing an intended pull off an 89 mph ball from fast bowler Mark Wood that hit him on the elbow but X-rays showed no fracture.
Babar's 10th four, a leg-glance off Stokes, took him to his ninth ODI hundred and first against England, in 104 balls before he holed out off Curran.