Nottingham - Ben Stokes' 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.
"You've just got to find a way to win and we're going to have situations where we play poorly through a phase of the game, but we've managed to come out the other end of that today to win the game," he said.
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
But the 28-year-old couldn't see England home, gloving a hook off Hasnain to wicket-keeper Sarfraz.
Test captain Joe Root (36) then edged left-arm spinner Imad Wasim to short third man where Hafeez held on at the second attempt.
England's 208 for three soon became 208 for four when Buttler, who made 110 not out at Southampton last weekend before being rested for Tuesday's six-wicket win, 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, running back from mid-on, holding a tough catch
Left-arm quick Junaid Khan reduced England to 258 for six with a superb right-handed caught and bowled off a slower delivery to dismiss Joe Denly.
And when Curran was yorked by Hasan Ali, England still needed 22 off 16 balls.
Stokes got the target down to 10 off 10 when he carved a six off Junaid that just cleared deep cover and he finished the job with a single.
He faced 64 balls, with five fours and three sixes.
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.
Pakistan 340-7, 50 overs (Babar Azam 115, Mohammad Hafeez 59, Fakhar Zaman 57; T Curran 4-75)
England 341-7, 49.3 overs (J Roy 114, B Stokes 71 no)
Result: England won by three wickets
Series: England lead five-match series 3-0 (1st ODI was a no-result due to rain)