Leg-spinner Rashid took 4-35 and England just did enough in a nervous chase to seal a thrilling and series-clinching three-wicket win over Pakistan in a Twenty20 decider.
Check out LIVE score of the third T20I between England and Pakistan in Manchester.
Jos Buttler, returning to the side as captain in place of the rested Eoin Morgan, top-scored with 59 in England's 200.
Pakistan captain Azam made 85 and shared an opening stand of 150 with Mohammad Rizwan in a national record T20 total of 232-6.
England vs Pakistan: Visitors left unsettled by 0-3 defeat in ODI series, says 'very worried' Misbah ul Haq
Pakistan was whitewashed in the three-match series with the biggest blow coming on Tuesday when they lost after scoring 331.
Only four of the England players involved in the ODI success have been retained for the three T20s against Pakistan, with Vince omitted.
England vs Pakistan: James Vince's ton outshines Babar Azam's as hosts win 3rd ODI by three wickets and sweep series
Set a challenging 332 to win 50-over world champions England, without most of their first-choice players because of a pre-series Covid outbreak, were faltering at 165-5.
Follow the full scorecard and ball-by-ball commentary on the third ODI between England and Pakistan at Edgbaston on our live blog
The 24-year-old took four for 42 and two for 21 in the first two matches against Pakistan, dismissing the world's number one 50-over batsman Babar Azam on both occasions.
England vs Pakistan: All-round Lewis Gregory helps hosts beat Babar Azam and Co by 52 runs in 2nd ODI, seal series
Somerset pace-bowling all-rounder Gregory, in just his second match at this level, struck with his first ball on Saturday on the way to 3-44 as England won with six overs to spare.
Highlights, England vs Pakistan, 2nd ODI at Lord's, Full Cricket Score: Hosts win by 52 runs, seal series
Follow live scorecard and ball-by-ball action from 2nd ODI played between England and Pakistan
England vs Pakistan: All-rounder Lewis Gregory credits PSL stint for knowing strengths and weaknesses of opponents
Gregory, one of five players in the England XI who were making their ODI debut, played his part with a miserly haul of 1-11 in four overs in the 1st ODI against Pakistan
England vs Pakistan: Nine uncapped players in Ben Stokes-led revised squad following COVID-19 outbreak
England's revised, hastily assembled 18-man ODI squad includes nine new caps and will be captained for the first time by Ben Stokes.
England vs Pakistan: Hosts forced to select new squad after seven members of ODI party test positive for COVID-19
England planned to name a new squad on Tuesday to be captained by Ben Stokes.
Minister for Information Fawad Chaudhry told the media after the cabinet meeting that Pakistan Television (PTV) requested the government to sign an agreement with Star and Sony to broadcast the matches.
Ged Stokes, who played rugby league in England in the 1980s and returned as a coach, was diagnosed with the disease in January.
The T20I series is expected to be moved to October before the T20 World Cup in India.
Sarfaraz Ahmed was not keen on playing final T20I after being overlooked for almost entire England tour, says Misbah-ul-Haq
Sarfaraz didn't get to bat but in the final overs, in a pressure situation, he was seen advising Azam.
Teenage paceman Naseem Shah and 20-year-old left-arm fast bowler Shaheen Afridi both impressed as Pakistan lost the three-match Test series 1-0 but drew the Twenty20 campaign 1-1.
England vs Pakistan: Justin Langer hails ‘fantastic’ Haider Ali after youngster smashes fifty on international debut
Haider, becoming the first Pakistan batsman to score a half-century in his first Twenty20 international as the tourists beat England by five runs in a last-ball thriller in Manchester on Tuesday.