Bangladesh bowled out Test opposition for under 200 for the first time ever but then let the initiative slip against Pakistan as 18 wickets fell on a dramatic second day of the third Test on Thursday.
Left-arm spinner Mohammad Rafique took five for 36, his third five-wicket haul in an innings in his last four Tests, and skipper Khaled Mahmud four for 37 to dismiss Pakistan for 175 and give the tourists a first innings lead of 106 runs.
They extended that to 183 by the close, losing quick wickets before limping to 77 for four in their second innings.
"If we can get another 120 runs tomorrow then we stand a better chance of winning this Test than Pakistan," said Mahmud, who had taken just one Test wicket with his gentle medium pace before the start of the three-match series.
Bangladesh, resuming on 248 for six, lost their last four wickets for just 33 runs in the morning, with Shabbir Ahmed doing the main damage with three wickets in six balls.
Pakistan reached 50 for two at lunch, with Mahmud taking the wickets of debutant Salman Butt and Mohammad Hafeez. Mahmud then sent back Inzamam-ul-Haq and Younis Khan before Rafique stepped in as the last seven Pakistan wickets fell for just 54 runs.
The home side, who have already won the series after victories in Karachi and Peshawar, hit back strongly as 19-year-old paceman Umar Gul followed up his four wickets in the first innings with another telling two-wicket burst to send back Hannan Sarkar and Habibul Bashar in the space of three balls.
Shabbir Ahmed also struck twice to leave Bangladesh on 41 for four, before Rajin Saleh dug in to reach an unbeaten 29.
Alok Kapali was forced to retire hurt though after being hit above the eye by a bouncer from Shabbir
Scoreboard
Bangladesh (1st innings): (overnight 248-6)
Hannan Sarkar c Rashid Latif b Umar Gul 13
Javed Omar c Younis Khan b Umar Gul 38
Habibul Bashar c Rashid Latif b Yasir Ali 72
Mohammad Ashraful lbw Saqlain Mushtaq 12
Rajin Saleh run out 49
Alok Kapali b Umar Gul 11
Khaled Mashud c Rashid Latif b Umar Gul 29
Khaled Mahmud lbw Shabbir Ahmed 19
Mohammad Rafique b Shabbir Ahmed 11
Tapash Baisya lbw Shabbir Ahmed 0
Manjural Islam not out 0.
Extras (lb-10, b-4, nb-13) 27
Total (all out, 99.2 overs) 281
Fall of wickets: 1-28, 2-102, 3-136, 4-166, 5-179, 6-241, 7-248, 8-278, 9-278
Bowling: Shabbir Ahmed 25.2-3-70-3 (nb-5), Umar Gul 32-7-86-4 (nb-7), Yasir Ali 14-4-43-1, Saqlain Mushtaq 25-5-61-1 (nb-1), Mohammad Hafeez 3-1-7-0
Pakistan (1st innings):
Mohammad Hafeez lbw Khaled Mahmud 21
Salman Butt c and b Khaled Mahmud 12
Yasir Hameed b Mohammad Rafique 39
Inzamam-ul-Haq c Sarkar b Khaled Mahmud 10
Younis Khan c Khaled Mashud b Khaled Mahmud 34
Farhan Adil lbw Mohammad Rafique 25
Rashid Latif c Alok Kapali b Tapash Baisya 5
Saqlain Mushtaq b Mohammad Rafique 9
Shabbir Ahmed lbw Mohammad Rafique 4
Umar Gul b Mohammad Rafique 5
Yasir Ali not out 0
Extras (lb-5, b-1, nb-5) 11
Total (all out, 54.4 overs) 175
Fall of wickets: 1-27, 2-36, 3-50, 4-121, 5-135, 6-152, 7-154, 8-166, 9-170
Bowling: Manjural Islam 13-3-42-0, Tapash Baisya 11-2-54-1 (nb-2), Khaled Mahmud 13-1-37-4 (nb-3), Mohammad Rafique 17.4-6-36-5.
Bangladesh (2nd innings):
Hannan Sarkar c Rashid Latif b Umar Gul 3
Javed Omar c Inzamam-ul-Haq b Shabbir Ahmed 16
Habibul Bashar c Rashid Latif b Umar Gul 3
Mohammad Ashraful c Butt b Shabbir Ahmed 3
Rajin Saleh not out 29
Alok Kapali retired hurt 17
Khaled Mahmud not out 2.
Extras (lb-1, w-1, nb-2) 4
Total (for four wickets, 21 overs) 77
Fall of wickets: 1-4, 2-9, 3-23, 4-41.
To bat: Khaled Mashud, Mohammad Rafique, Tapash Baisya, Manjural Islam.
Bowling (to date): Umar Gul 8-0-32-2 (nb-2 w-1), Shabbir Ahmed 10-5-29-2, Yasir Ali 1-0-6-0, Saqlain Mushtaq 2-0-9-0.