It was their fourth victory in 21 Tests in England over 40 years and their first since a 1-0 victory in a two-Test series 10 years ago
Veteran batsman and former captain Mohammad Yousuf marked his return to international cricket with a well-made 56 before he became Graeme Swann’s 100th Test wicket, having put on 69 with Ali.
And before stumps there was still time for Pakistan to dismiss England captain Andrew Strauss (four), caught at second slip by Yasir Hameed off left-arm quick Mohammad Aamer.
England closed on six for one in their second innings, 69 runs behind, with struggling opener Alastair Cook nought not out and nightwatchman James Anderson unbeaten on two.
Ali’s innings was the cornerstone of Pakistan’s 308, which gave them a first innings lead of 75. Pakistan’s poor catching had been a key factor in their falling 2-0 behind in this four-match series.
But on Thursday it was England who paid the price for missing a routine chance when Strauss, at first slip, put down Mohammad Asif when the No 11 was on four and Ali on 66.
Pakistan were then 278 for nine but, with Ali seizing on anything either over-pitched or short from Stuart Broad, the last-wicket pair added 38 runs.
The 25-year-old Ali’s second fifty in five matches at this level, after he made 51 in Pakistan’s three-wicket win over Australia at Headingley last month, was not a lone hand.
Former captain Yousuf was playing his first Test since January following the overturning of an “indefinite ban” imposed by the Pakistan Cricket Board after he led the side on their winless tour of Australia.
But shortly before tea he drove too early at a Swann delivery and was caught and bowled to end a 108-ball stay featuring eight boundaries.
It meant Swann had taken his 100th wicket in 23 Tests.
He was the third quickest off-spinner to the landmark behind India’s Erapalli Prasanna (20 Tests) and South Africa’s Hugh Tayfield (22).
Umar Akmal elegantly late cut medium-pacer Paul Collingwood for four to give Pakistan a first innings lead.
But next ball, setting off for a single that was never on, he was run out by Eoin Morgan’s direct under-arm hit from cover for 38 featuring four fours and a straight six off Swann.
Ali and Umar Akmal put on 57 for the sixth wicket.
Kamran Akmal and Mohammad Aamer then both fell cheaply to Broad, bowling with the new ball. Ali, on 62 when Asif came in, was left just short of a maiden Test hundred when the seamer drove Swann straight to Anderson at mid-off.
Swann led England’s attack with four wickets for 68 runs in 27.2 overs.
Pakistan, bowled out for record low scores against England of 80 and 72 in crushing defeats by 354 runs and nine wickets in the first and second Tests respectively, had failed to add to their overnight score of 48 for one when recalled opener Hameed was caught behind off Finn. —
It was their fourth victory in 21 Tests in England over 40 years and their first since a 1-0 victory in a two-Test series 10 years ago
The visitors seem set to claim victory on Monday, barring yet another twist in a Test match full of them
Virat Kohli also returns to the Test team after he missed the five matches against England at home due to the birth of his second child
The first Asian-origin cricketer to captain England in T20Is, Ali has scored five centuries in tests and three in ODIs, also taking 366 wickets across all three formats
The former all-rounder has returned to cricket during the past year after a horrific car crash at the end of 2022
Three stadiums in Pakistan are undergoing renovation work for next year's Champions Trophy
The T20 series will be played between September 11-15 with the ODI series taking place from September 19-29
ICC Chief Executive Geoff Allardice along with other ECB officials was also present on the occasion