On the second day, Pakistan patiently advanced to 350 for eight against a toothless England attack to take control of the first Test.
Pakistan then consolidated their strong position by reaching stumps having lost just Imam-ul-Haq to be 50 for one - a deficit of 134 runs. Cook, playing in a record-equalling 153rd consecutive Test, was bowled by an excellent delivery from Mohammad Amir to end an innings lasting over three hours.
Though Pakistan can take credit for the way they used the conditions, they were helped by an England team that gave wickets away with a combination of recklessness and indeterminate footwork.
Pakistan had drawn the four-match test series with England by 2-2.
Amir put paid to Cook's hopes of a fifth Test ton at headquarters, though, and England wilted once he fell, with Stokes, who hammered leg-spinner Shadab Khan for the innings' sole six, out lbw to Abbas on review in his first game at home since the second ODI against Windies in September.
Abbas made the breakthrough when he bowled Mark Stoneman (four) with a late swinging delivery.
Root, who could have been run out before he had scored, played carefully to get to four before driving rashly at a wide ball from Hasan to nick a catch to wicketkeeper Sarfraz Ahmed.More news: Is Nicki Minaj Actually Dating Eminem?!
More news: Michael Cohen’s Shady Business Partner Agrees to Cooperate With the Feds
More news: Armed Bystanders Shoot, Kill Gunman Who Opened Fire at Oklahoma City Restaurant
Cook's half-century had glued England's innings after Stoneman was bowled through the gate by a beauty from Abbas and Hasan had Root and Malan caught behind - Root falling to a lavish drive on his return to No 3, the spot from where he hit a career-best 254 against Pakistan in 2016.
He completed a 62-ball fifty, including six fours, before a gloved hook off Stokes was well held down the legside by Bairstow in a rare England fielding highlight.
Pakistan's close-catching has often been a fallible part of their game.
Hasan, a skiddy, English-type bowler, took the second of his four wickets in his next over, finding the outside edge of Dawid Malan as Root's decision to bat first in overcast conditions began to look increasing suspect.
The innings ended when Amir running back at mid-on, caught Mark Wood. The live cricket streaming of the match will be available on Sony LIV, while the live telecast of the match will be available on Sony SIX, Sony Six HD.
England's batsmen were battling to avoid an innings defeat to Pakistan after losing both opening batsmen early on day three of the first test at Lord's on Saturday.