|Fourth Test, Kia Oval, day four|
|England 328 & 253: Bairstow 81, Yasir 5-71|
|Pakistan 542 & 40-0:|
|Pakistan won by 10 wickets|
Pakistan completed a 10-wicket win over England on day four at The Oval as the four-match series ended in a 2-2 draw.
Resuming 126 runs behind at 88-4, England began well with consecutive half-century partnerships.
But two wickets fell in successive balls after lunch, including the enterprising Jonny Bairstow for 81 from 127 balls, and they were 253 all out.
Spinner Yasir Shah took 5-71 and, set a paltry 40 to win, Azhar Ali sealed the match with a six soon after tea.
Many would have welcomed a fifth Test to decide an intriguing series but the teams will next meet again in limited overs cricket.
A five-match one-day international series begins on 24 August, followed by a Twenty20 international on 7 September.
Pakistan triumph on Independence Day
The build-up to the final game had focused on England's quest to regain the number one Test ranking, but it was Pakistan who took a decisive step towards the top spot.
They will reach the summit if India do not beat West Indies in next week's final Test in Trinidad and Australia fail to win the final Test in Sri Lanka.
After losing the previous two matches easily it was an impressive recovery, with 38-year-old Younus Khan reaching 200 for the sixth time and Shah claiming his sixth five-wicket haul in only his 16th Test.
Seamer Sohail Khan proved a useful addition, taking 13 wickets in the final two matches.
With their supporters basking in the south London afternoon sunshine, there was double celebration as victory was achieved on the nation's Independence Day.
No perils in the pitch
It was no typical end of Test minefield with the ball turning dramatically out of the rough or reverse swinging, and England set about their task in confident, composed fashion.
Bairstow, looking to score at every opportunity and resolute when defence was required, completed his fourth fifty of the series and was well supported by Gary Ballance until the left-hander fished at one wide of off-stump from Sohail for 17.
The momentum was continued by first-innings centurion Moeen Ali, who lofted Shah high over wide long-on for six and looked in complete command before an uncharacteristically flat-footed prod at the leg-spinner was caught by wicketkeeper Sarfraz for 32 in the penultimate over before lunch.
A stunning piece of fielding from bowler Wahab Riaz gave Pakistan the breakthrough in the eighth over after lunch, hitting the stumps directly while lying down when Chris Woakes (4) was sent back in mid-pitch.
Having moved to 992 runs for the calendar year, Bairstow drilled the next delivery low to cover and the end of the innings came 35 minutes before tea, debutant Iftikhar Ahmed taking the final wicket of James Anderson (17).
Questions remain over England's batting
Security checks permitting, England's next Test assignment is a two-match series in Bangladesh starting in October, before a three-Test series in India.
Opener Alex Hales scored three half-centuries earlier in the summer against Sri Lanka but averaged only 18 in this series with a best of 54.
Having refunded a spectator £4.10 because of England's slow over-rate in the previous Test, he lost 15% of his match fee here for an angry response following his controversial dismissal to a low catch in the first-innings.
Neither James Vince's introduction to Test cricket or Ballance's return was a success, with Alastair Cook and Joe Root scoring 935 between them at an average of 66.78, compared to Hales, Vince and Ballance's 498 at 22.63.
There was also a fitness concern over one of the bowlers, Steven Finn going off shortly before the end with a hamstring injury that will require a scan, as England suffered their first home defeat when batting first since 2012.
Stats you may have missed
- England have lost the last Test in six of their past seven series
- Since 2015 England have won only one Test out of six in London, losing four
- In eight matches outside of the capital since 2015 they have won seven
- In home Tests this year Chris Woakes scored 282 runs and took 34 wickets, only Ian Botham and Andrew Flintoff have achieved 300 runs and 30 wickets in a season in England
- England's defeat means Australia 2004-05 and 2007-08 and South Africa 2012-14 remain the only teams to hold trophies against all nine Test opponents at the same time