|Pakistan 154-6 (20 overs): Rizwan 76* (57); Rashid 4-35|
|England 155-7 (19.4 overs): Roy 64 (36), Hafeez 3-28|
|England won by three wickets|
England overcame an almighty wobble to beat Pakistan in a pulsating final Twenty20 at Emirates Old Trafford and win the series 2-1.
Chasing 155 on a dry, turning pitch, England needed 61 from nine overs with eight wickets in hand after Jason Roy's 64.
However, with Pakistan's spinners applying a vice-like grip and Dawid Malan struggling to score freely, the equation went out to 39 from four overs before captain Eoin Morgan regained control.
In a dramatic penultimate over, Malan was bowled by Mohammad Hafeez, only for Liam Livingstone to hit his first ball for six then be caught off his next, leaving six required off the final over.
Although Morgan holed out with four needed, Chris Jordan got England over the line with two balls to spare.
England's own spinners were earlier at the fore, restricting Pakistan to 154-6. Mohammad Rizwan batted through the innings for 76 not out, but the tourists were shackled by Adil Rashid's 4-35.
The hosts end their white-ball summer with only one defeat from 12 matches against Pakistan and Sri Lanka, now moving on to a five-Test series with India which begins on 4 August.
Before then, English cricket takes a step into the unknown with the inaugural season of The Hundred, which starts on Wednesday with the opening match of the women's competition.
Oval Invincibles versus Manchester Originals begins at 18:30 BST and is live on BBC Two.
- England win last-over thriller - watch highlights on BBC iPlayer
- England v Pakistan - results & reports
- How to follow The Hundred on the BBC
England come through dramatic examination
This was ideal preparation for the T20 World Cup in the United Arab Emirates and Oman starting in October.
Although the deafening atmosphere is likely to be very different to what England will experience at that tournament, to win a high-stakes game by completing a tense chase on a spinning pitch against a skilful attack is an examination passed.
From a position where they were coasting, England were plunged into tension by some questionable strokes and the nous of the Pakistan bowlers.
Captain Morgan looked to have the game won when he flicked two sixes off Hasan Ali's 18th over, yet vastly experienced off-spinner Hafeez dragged Pakistan back into it.
Malan was bowled trying to make room, and rising star Livingstone heaved his first ball over mid-wicket, then sliced to short third man.
Morgan skied a missed chance from the first ball of Hasan's last over and ran two, then was caught, only for the nerveless Jordan to take the required four runs from the next two deliveries.
Spinners hold Pakistan again
England's 45-run win in the second match at Headingley on Sunday was partly engineered by the spinners, and they repeated the dose at Old Trafford.
Just like in Leeds, England sent down 11 overs of spin, with Livingstone filling the role of leg-spinner Matt Parkinson, who was left out on his home ground.
They were again led by the dependable Rashid, who returned his best figures in a T20 international, while off-spinner Moeen Ali conceded only 19 runs from four overs.
Rizwan swiped the majority of his runs through the leg side, but after he added 40 in the first five overs with captain Babar Azam, Pakistan slowed once Babar was stumped off a delightful Rashid googly.
At one stage, England went through a 12-over period bowling 11 of spin, with Pakistan managing 85 runs for the loss of five wickets.
Hasan gave some impetus at the death when England returned to pace, taking Pakistan to a total that was almost enough.
England falter after Roy dazzles
The conditions and a Pakistan team full of spin options always had the potential to give England problems in the chase - the usually destructive Jos Buttler scraping 21 from 22 balls gave an indication of the batting difficulties.
Still, England were cruising as Roy swatted on the leg side and crashed through point for his highest score in a T20 international since February last year.
His dismissal - miscuing leg-spinner Usman Qadir to long-off - was followed by Jonny Bairstow needlessly being caught at cover off slow left-armer Imad Wasim and Moeen being bowled hacking at Hafeez.
Malan managed 31 from 33 deliveries, but he at least provided a foil for Morgan, whose 21 from just 12 balls ensured England emerged from the chaos.
'This win means a huge amount' - what they said
England captain Eoin Morgan: "This win means a huge amount. This was the worst possible pitch for the way we play, and we have won on a wicket which is slow and spins, so I am very proud.
"I genuinely don't think the ball will spin like that in UAE, but we are ready for any surfaces that do spin."
Player of the match Jason Roy: "I just went out there and tried to have a bit of fun. I was frustrated to get out when I did but the boys were good enough to get us over the line.
"We play incredible cricket on flat pitches and score millions of runs. For us to have a performance like that on a pitch like that is very rewarding. Today is going to give us lots of confidence."
England Test bowler James Anderson on their T20 World Cup chances: "They have got an absolutely fantastic chance. The quality they have got in their squad is as good as, if not better, than anyone else in the world.
"They have got the skills and the players to be able to perform in all conditions. They've got players who know how to win tournaments now."
Pakistan captain Babar Azam: "We were 10 to 15 runs short today. Our batting let us down, but we fought, our players fought well and you saw the fight from them which was good.
"We need to do better against spinners. We haven't batted as well as we could. Some days we have good days and some days we have bad days."
- The Rap Game UK Season 3: DJ Target, Krept and Konan hunt for the next big MC
- Transforming a rental into your dream space: It's boys versus girls when it comes to decorating this house share!