Kamran Ghulam's debut hundred powers Pakistan to 259-5 against England
With Pakistan resting an out-of-form Babar Azam after their innings defeat in the series opener, Kamran was drafted in and he impressed immediately with a stellar 118 that included 11 fours and a six.
Pakistan were reeling at 19-2 when Kamran walked in and the right-hander forged a 149-run stand with opener Saim Ayub (77) to steady the innings.
He also raised 65 runs with Mohammad Rizwan, who was batting on 37 at stumps with Salman Agha on five at the other end.
Earlier, Pakistan captain Shan Masood won the toss but was soon ruing his decision to bat first.
After five overs of seam bowling, England captain Ben Stokes opted for spin from both ends and the decision paid off immediately.
Jack Leach beat Abdullah Shafique's tentative prod and uprooted the off-stump to dismiss the opener for seven.
In his next over the left-arm spinner dismissed Shan for three, getting the Pakistan skipper to flick a delivery from outside the off-stump into the hand of Zak Crawley at short mid-wicket.
Kamran showed no nerves though as he stepped out against Leach hitting the spinner over his head for a big six.
He and Saim returned after the lunch break to consolidate Pakistan's position and Kamran took a single off Shoaib Bashir to bring up his maiden test fifty.
Keen to break the stand, Stokes brought himself on and proved quite a handful with his swing and awkward bounce though a wicket eluded the seamer.
Stokes maintained an attacking field, however, and Saim eventually fell into the trap, pushing a ball from Matthew Potts straight into the hand of the England captain at short mid-off.
Kamran got a lifeline on 79 when Ben Duckett spilled a catch at mid-on and the batter went on to bring up his hundred with a four off Joe Root.
Off-spinner Bashir ended Kamran's fine knock when the off-spinner lured out the batter, beat him with turn and knocked back the leg stump.
England were bolstered by the return of Stokes, who missed their comprehensive victory in the opening test at the same venue to complete his recovery from a hamstring injury.
Stung by the shellacking, Pakistan have dropped Babar as well as frontline pacers Shaheen Afridi and Naseem Shah.