Teenage paceman Naseem Shah became the youngest player to record a Test hat trick as Pakistan closed in on victory against Bangladesh in Rawalpindi on Sunday. Just when Bangladesh seemed to have fought their way back into the match at 124-2 minutes before the close on the third day, Naseem destroyed them with three wickets off successive deliveries. Aged 16 years and 359 days, he becomes the youngest player to record a Test hat trick, besting Bangladeshi Alok Kapali who achieved the feat aged 19 in 2003. Naseem trapped Najumul Hossain Shanto leg before off the fourth ball of his seventh over for 38, then followed up with dismissals of Taijul Islam (lbw) and Mahmudullah (caught) with the next two deliveries. Naseem had figures of 4-26 before he left the field with a shoulder injury. Shanto and Mominul Haque, unbeaten on 37 at the close, had added 71 for the third wicket after they lost Saif Hassan on 16 and Tamim Iqbal on 34. At the close, Bangladesh were 126-6 and needing another 86 runs to avoid an innings defeat with two days to play. Naseem, who burst onto the scene on Pakistan's Australia tour last year, is also the youngest fast bowler and second bowler overall to take five wickets in a Test innings. He achieved that feat at 16 years and 307 days against Sri Lanka in Karachi last year. Pakistan were bowled out for 445 in their first innings with Babar Azam scoring 143 and Haris Sohail 75. Saif, playing his first Test, was on a pair after his second-ball duck in the first innings but he started confidently to reach 16 with four boundaries before he was bowled by Naseem. Iqbal, fresh from scoring the highest first-class score on Bangladeshi soil of 334 not out last week, was trapped leg-before by Yasir. Earlier, Pakistan lost seven wickets either side of lunch with Sohail holding the innings together. He struck seven fours and two sixes for his third Test half-century before holing out off spinner Taijul Islam to deep mid-wicket. Last man Naseem was run out to end Pakistan's first innings. A healthy 10,000-strong holiday crowd had come in anticipation of popular batsman Babar Azam scoring a double hundred. But resuming at 342-3, Pakistan lost Azam to the first ball of the day. Azam seemed caught in two minds whether to play or leave a length delivery from pace bowler Abu Jayed and edged to Mohammad Mithun at first slip. Azam's 143 was his fifth Test hundred and a masterclass of attractive batting, which included a six and 18 fours. Asad Shafiq, who put on 137 for the fourth wicket with Azam, added just five to his overnight score before he was caught behind off fast bowler Ebadot Hossain for a 65 that included nine boundaries. Jayed was the pick of the bowlers with 3-86 while Islam finished with 2-139. Scoreboard Bangladesh 1st innings 233 (Mohammad Mithun 63, Najmul Hossain Shanto 44; Shaheen Shah Afridi 4-53) Pakistan 1st innings (overnight 342-3) Shan Masood b Islam 100 Abid Ali c Das b Jayed 0 Azhar Ali c Shanto b Jayed 34 Babar Azam c Mithun b Jayed 143 Asad Shafiq c Das b Ebadat 65 Haris Sohail c b Islam 75 Mohammad Rizwan c Mahmudullah b Rubel 10 Yasir Shah lbw b Rubel 5 Shaheen Shah Afridi lbw b Rubel 3 Mohammad Abbas not out 1 Naseem Shah run out 2 Extras: (b 1, lb 3, nb 2, w1) 7 Total: (all out; 122.5 overs) 445 Fall of wickets: 1-2 (Abid), 2-93 (Azhar), 3-205 (Masood), 4-342 (Azam), 5-353 (Shafiq), 6-374 (Rizwan), 7-415 (Yasir), 8-422 (Shaheen), 9-442 (Sohail) Bowling: Ebadat 25-6-97-1, Jayed 29-4-86-3 (1nb), Rubel 25.5-3-113-3 (1nb, 1w), Islam 41-6-139-2, Mahmudullah 2-0-6-0 Bangladesh 2nd innings Tamim Iqbal lbw b Yasir 34 Saif Hassan b Naseem 16 Najmul Hossain Shanto lbw b Naseem 38 Mominul Haque not out 37 Taijul Islam lbw b Naseem 0 Mahmudullah c Sohail b Naseem 0 Mohammad Mithun b Yasir 0 Liton Das not out 0 Extras: (w 1) 1 Total: (for six wkst; 45 overs) 126 Still to bat: Rubel Hossain, Abu Jayed, Ebadat Hossain Fall of wickets: 1-39 (Saif Hassan, 8.6 ov), 2-53 (Tamim Iqbal, 15.5 ov), 3-124 (Shanto), 4-124 (Islam), 5-124 (Mahmudullah), 6-126 (Mithun) Bowling: Shaheen 11-2-35-0 (1w), Abbas 11.4-5-20-0, Naseem 8.2-2-26-4, Yasir 11-2-33-2, Shafiq 3-0-12-0 Toss: Pakistan Umpires: Nigel Llong (ENG) and Chris Gaffaney (NZL) TV umpire: Marais Erasmus (RSA) Match referee: Richie Richardson (WIS)