Bangladesh recorded their first series-win against Pakistan after opener Tamim Iqbal's second successive century secured a seven-wicket victory in the second ODI.
The hosts had won the opening game by 79 runs, their first win over Pakistan in 16 years.
The boys are very happy. The job is not done yet, we have one more to go
After restricting Pakistan to a modest 239 for six, the hosts returned with Tamim, who had scored 132 in the first game, leading their successful chase with nearly 12 overs to spare.
Chasing 240 to clinch the three-match series, Bangladesh lost opener Soumya Sarkar in the third over but Tamim dominated a 78-run stand with Mahmudullah (17) to keep the hosts firmly on track.
Saeed Ajmal removed Mahmudullah in the 15th over but that brought in Mushfiqur Rahim (65) and the wicketkeeper-batsman proved a perfect foil for the left-handed Tamim as they added 118 runs to take Bangladesh close to their target.
Tamim glanced Junaid Khan for a boundary to bring up his sixth ODI century and remained unbeaten after a run-a-ball 116 that included 17 boundaries and a six.
Earlier, new ODI captain Azhar Ali's decision to bat first at the Shere Bangla National Stadium backfired with the tourists losing the top half of their batting order by the 22nd over.
Ali notched 36 runs but Bangladesh made early inroads to reduce Pakistan to 77 for five before Harris Sohail (44) and Saad Nasim propped up the innings with a 77-run stand.
Both teams are set to return to the ground for the third and final match on Wednesday.
Pakistan 239-6 in 50 overs (Nasim 77, Shakib 2-51)
Bangladesh 240-3 in 38.1 overs (Iqbal 116*, Ajmal 1-48)
Source: Al Jazeera and agencies