Misbah-ul-Haq completed the proceedings by hitting a six off Elias Sunny as Pakistan wrapped up the series 2-0.
Dhaka: Pakistan just beat the fading light to win the second Test against Bangladesh by seven wickets on Wednesday and complete a 2-0 series sweep.
Bangladesh lost their last five wickets for 22 runs in the afternoon session as they collapsed to 234 all out in their second innings, giving Pakistan a target of 103 runs to win with just over a session to play.
Mohammad Hafeez top-scored for the tourists with 47 while Azhar Ali made 34 to lead the Pakistan charge. Both fell late on, leaving captain Misbah-ul-Haq to hit the winning runs with a six over long-off to take the tourists to 107-3.
In the morning session, Bangladesh's hopes of a draw looked good after Nasir Hossain and skipper Mushfiqur Rahim made a 117-run partnership for the sixth wicket.
Nasir's 79 came off 172 balls and with 11 boundaries while Rahim collected his 53 from 143 balls that included seven boundaries.
But some adept spin bowling by Pakistan led to a familiar batting collapse by the hosts and set up the win for Misbah's team.
Abdur Rehman led the bowling attack by taking 4-51 while Umar Gul, Aizaz Cheema and Saeed Ajmal took two wickets each for Pakistan.
The floodlights were already on by the time Pakistan began their run chase. Taufeeq Umar was dismissed for 3 early on when he was caught by Nazimuddin off the bowling of Nazmul Hossain.
Hafeez and Azhar put Pakistan back on the winning trail with a second-wicket partnership of 63. Misbah (16 not out) and Man-of-the-Series Younis Khan (6 not out) took Pakistan home.
Pakistan also won the three one-dayers and the lone Twenty20 game. They next travel to the United Arab Emirates for a three-Test series against No. 1-ranked England followed by four one-dayers and three Twenty20 matches.