Dhaka: Left-arm spinner Abdur Rehman broke through Bangladesh's resistance before Pakistan raced against fading light to complete a seven-wicket win on the final day of the second test on Wednesday.
Set a winning score of 103, Pakistan had no choice but to try to score quickly to claim a 2-0 series win, playing most of the final two sessions on the fifth day under floodlights.
Opener Mohammad Hafeez led Pakistan's victory charge with 47 off 52 balls before his attempted slog off Shakib Al Hasan ended at long-on fielder Shahadat Hossain.
He added 63 runs with Azhar Ali for the second wicket after first innings centurion Taufiq Umar was dismissed for three when he lofted a catch to Nazimuddin at midwicket off Nazmul Hossain.
Azhar was last man out when left-arm Elias Sunny bowled him for 34 off 43 balls with Pakistan two runs away from a win.
Misbah-ul-Haq completed the win with a six as Pakistan raced to 107 runs in 20.5 overs amid fears that the umpire might stop play for bad light.
"The situation was like that anytime the light could be dropped," Misbah told a news conference.
"Normally we have targeted to finish the game before 10 to 15 overs that's why we played quite quickly."
The hosts were looking comfortable after a delayed start due to fog before Rehman revived Pakistan's hopes by ending a dogged 117-run sixth-wicket stand between Nasir Hossain and Mushfiqur Rahim to finish with career-best figures of 4-51.
Saeed Ajmal then claimed the final two wickets to complete a typical Bangladesh collapse.
The home side resumed after lunch on 200-5 but lost their last five wickets for 34 to be bowled out in their second innings with an hour remaining before the tea interval.
Rehman bowled Nasir for 79 runs before he had Rahim caught by Ajmal at mid-off for 53 as Bangladesh crumbled after surviving the morning session unscathed.
Nasir struck 11 fours for his maiden test fifty while Rahim hit seven fours.
"When Nasir and I batted, I thought it would have been a different game had we batted till tea," said Rahim. "They'd have found chasing 150-180 quite difficult. That makes me feel bad."
"We lost five wickets the previous night and we fought well today. I think we can learn from these situations."
Younus Khan took a brilliant catch at first slip to send back the next batsman Shahadat off Rehman and Ajmal soon bowled Sunny for four and dragged last man Robiul Islam out of the crease for a stumping to end the innings.