Pakistan end first day 107-2 after debutant Abrar's 7-fer helped bowl England out for 281
The hosts started their innings nervously with Imam-ul-Haq nicking behind for a duck off James Anderson. Fellow opener Abdullah Shafique was later dismissed for 14 by Jack Leach, with Pakistan at 51-2.
However, a 56-run partnership between Saud Shakeel (32*) and Babar took them to the close of play in a confident position, despite conditions offering a bit for the spinner.
Earlier, Pakistan debutant Abrar had mesmerised England, grabbing seven wickets.
The 24-year-old - nicknamed "Harry Potter" by friends because he wears glasses similar to those of the fictional boy wizard - spun magic of his own after England decided to bat.
He dismissed Zak Crawley (19), Ben Duckett (63) and Joe Root (eight) in the first two hours, before sending Ollie Pope (60) and Harry Brook (nine) on their way.
After lunch, Abrar then picked up Ben Stokes (30) and Will Jacks (31), to claim 7-114 on his remarkable test debut.
Abrar became the 13th Pakistan bowler to take five or more wickets in an innings on debut.
"I will not forget this day," he told Sky Sports via an interpreter. "I want to win this match for Pakistan and also do well in the coming matches.
"I bowled cross-seam to start to see what was required. Variations were the key on this pitch."
At one point, he was also eyeing up all ten wickets, before Zahid Mahmood took the final three wickets. Ollie Robinson (5), Leach (0) and Anderson (7) were his victims
Mark Wood scored a counter-attacking 36 off just 27 balls, to lift England to 281 after being 249-9.
Follow the match live at Flashscore with Pakistan now batting
Despite losing wickets regularly, England scored at a typically brisk pace, with Duckett knocking nine boundaries and a six and Pope cracking five to the rope.
Babar employed spin as early as in the ninth over, and Abrar bowled Crawley with a sharp incoming delivery with his fifth Test ball.
He then trapped Duckett and Root leg-before -- both given out only after Azam reviewed the on-field calls.
Abrar made it 167-5 when Pope and Brook miscued aggressive shots and were caught.
His delivery to dismiss Stokes was a gorgeous googly, with left the England captain perplexed. Jacks was then removed LBW.
Duckett refused to call Abrar a 'mystery' spinner and said they would be better prepared to face him in the second innings.
"There was no real mystery to it but he bowled beautifully today," the opener said. "I'm sure we'll have our plans second innings but I'm pretty sure it won't be blocking it."
TOSS
England started the day by winning the toss, and Stokes elected to bat.
Pakistan were forced to make a number of changes to their side due to injuries, as well as already being without pace spearhead Shaheen Afridi, who misses the series following appendicitis surgery.
Fast bowlers Naseem Shah and Haris Rauf were ruled out, along with top order batsman Azhar Ali.
The home side replaced them with all-rounders Mohammad Nawaz and Faheem Ashraf, and Abrar.
England, who are 1-0 up in the three-test series, announced their playing 11 on Thursday, bringing in fast bowler Wood for injured all-rounder Liam Livingstone.
England, on their first test tour of Pakistan since 2005, won the opening match in Rawalpindi by 74 runs.