When Azhar was out, Pakistan -- already 3-0 down in the five-match series -- were 169 for six off 38 overs and in danger of failing to bat out their full 50 in this day/night fixture.
But the fit-again Imad Wasim's unbeaten 57 and his eighth-wicket stand of 56 with Hasan Ali took Pakistan past 200.
England slow bowlers Adil Rashid and Moeen Ali shared five wickets between them, with leg-spinner Rashid -- one of five Yorkshire players in the side -- taking three for 47 on his home ground.
England left out pace bowlers Mark Wood and Chris Woakes, with their places taken by left-arm quick David Willey and all-rounder Chris Jordan.
More From This Section
Jonny Bairstow came in after wicket-keeper Jos Buttler was withdrawn in the warm-up because of a hamstring injury.
Pakistan rested pacemen Mohammad Amir -- whose 58 on Tuesday was the highest ODI score by a No 11 batsman -- and Wahab Riaz as well as all-rounder Shoaib Malik and leg-spinner Yasir Shah.
Sharjeel Khan, who made a dashing 58 at Nottingham again looked in good touch as he pulled Jordan for four and flicked him over deep square for six.
But the left-handed opener fell for 16 when he sliced Jordan over the offside infield and Ben Stokes, running back, held a good catch.
Willey and Jordan bowled three maidens in the first six overs. Pakistan went 16 balls without a run before Azhar got off the mark by cover-driving Willey for four.
He also hoisted Plunkett and Rashid for two well-struck sixes. But wickets fell around him steadily, with a diving Plunkett holding an excellent catch at mid-on to dismiss potential dangerman Sarfraz Ahmed (12) following a hard-hit drive off Rashid.
But left-hander Wasim, who made an unbeaten 63 in the second ODI at Lord's before a knee injury ruled him out at Trent Bridge, struck seven fours and drove Willey for a superb straight six.
Gul, off the penultimate ball of the innings, also hit Willey for six but Pakistan now needed a special display in the field to prevent another England win.