Lunch Pakistan 579 and 163 for 3 (Shakeel 63*, Rizwan 42*) need another 174 runs to beat England 657 and 264
Having resumed on 24 not out, Shakeel moved to an unbeaten 63 by lunch, with Rizwan not out 42 after upping the tempo from a sedate start with the visitors hunting eight wickets on the final day.
They got one - that of Imam, who loomed as a potential danger for England, having scored 121 in the first innings and steadying his side on day four, Pakistan resuming on 80 for 2 and needing another 263. Imam added just five more to his overnight 43 before he was strangled down the leg side by James Anderson, giving England an important breakthrough after five tight overs of seam bowling by Anderson and Ollie Robinson.
Imam's dismissal didn't lead to the return of Azhar Ali, who retired hurt late the previous evening after being struck on the tip of his right index finger by an Robinson delivery but had been cleared to bat on the final day. Instead, Rizwan strode to the middle.
Jacks entered the attack after the first hour on Monday, in which Pakistan had added just 13 runs. Rizwan got off the mark on the 24th ball he faced with a slog-sweep off Jacks and he added a second four in three balls, clearing midwicket to bring up Pakistan's 100.
Beaten once by Jack Leach who found a skerrick of turn in the following over, Rizwan responded by cutting his next ball through the covers to the boundary, his third four in eight balls, before launching Jacks over long-off for six.
A switch apparently flicked, the heat spread as Shakeel drove straight back over Leach's head for four on the first ball of the next over. A repeat shot brought up his maiden Test fifty as the promise of the previous evening that it would be both sides vying for the win looked to be back on.
With the seamers staying miserly throughout, both batters took to England's spinners, Rizwan helping himself to 12 runs off Leach shortly before the lunch break. He evaded danger when he charged down the pitch and chipped Leach over cover with Jacks running back but unable to make up the ground as the ball dribbled for two. Rizwan smashed the next ball for six into the sightscreen and clubbed the last ball of the over through point to cap an excellent session for the hosts in which they managed to add 89 runs, thanks largely to his unbroken 80-run stand with Shakeel.