Bangladesh needs 148 runs for a clean sweep against Pakistan after young pace bowlers Hasan Mahmud and Nahid Rana rattled the hosts for 172 in the second test on Monday.
Bangladesh has won just one bilateral test series away from home — beating the West Indies in 2009 — but won the first test by 10 wickets for its first ever test victory against Pakistan.
The 24-year-old Mahmud grabbed 5-43 while 21-year-old Rana chipped in with 4-44 as Pakistan was bowled out half an hour before tea on Day 4 for an overall lead of 184.
Bangladesh openers Zakir Islam and Shadman Islam guided the tourists to 37-0 going into the final session under overcast conditions, with Islam twice pulling fast bowler Khurram Shahzad for sixes in his unbeaten 27.
A resilient century from Litton Das and equally splendid half century from Mehidy Hasan Miraz allowed Pakistan a slender first innings lead of 12 runs after the tourists had collapsed to 26-6 on Day 3.
The Pakistani top order's long struggle in red-ball cricket has seen it lose five of the last nine test matches at home with its last win coming against South Africa in December 2021. The other four test matches were drawn.
Babar Azam's (11) poor run of form in test matches stretched to seven games when he fell to Rana for the second time in the series as the tall fast bowler rattled the top order by claiming three wickets in his first three overs.
Top-scorer Salman Ali Agha (47 not out) and Mohammad Rizwan (43) led the recovery with a half century partnership after Rana's burst had reduced the home team to 81-6 in the first session, before Mahmud sliced through the lower order.
Mahmud was a on a hat trick when he had Rizwan caught behind after the break and followed it up with another brilliant ball that found the outside edge of Mohammad Ali's bat. But Salman added a vital 36 runs in the company of tailenders before Mahmud completed a five-for by claiming the last wicket.
Earlier, Rana could have ended the first session with four wickets but Rizwan was dropped in the slips cordon. Rana came to the fore after Taskin provided the breakthrough when skipper Najmul Hossain Shanto dived low to his left and grabbed a two-handed catch to dismiss Saim Ayub for 20.
Skipper Shan Masood struck four boundaries in his 28 before Pakistan's innings crashed against Rana's pace. Masood and Saud Shakeel got slight edges and Pakistan's premier batter Babar edged to Shadman at slip after struggling for 18 balls. Shadman dropped a regulation chance on the next ball to give Rizwan a big reprieve as Pakistan went to lunch at 117-6.
Babar has been going through a poor run of form and it's now been eight test matches since he posted a half-century. His top score in that time was 41 against Australia at Melbourne last year.
Both teams are near the bottom of the World Test Championship, with Bangladesh occupying seventh spot and Pakistan just ahead of last-placed West Indies.