A century from Azhar Ali laid the platform for Pakistan to push to a big total, but a farcical collapse thereafter ensured they only made 250. Two big stands - 91 for the first wicket between Azhar and Sami Aslam, and 98 for the third between Azhar and Haris Sohail - took Pakistan to 203 for 2 in the 39th over, before they lost their last eight wickets for 47 runs and left six balls of their 50 overs unused.
The implosion left the door open for Bangladesh - who must have imagined they would have to chase a 300-plus target - to complete a 3-0 whitewash and shine the harshest possible light on the flaws in Pakistan's new-look side.
For nearly 40 overs Pakistan were showing promise. Aslam, the 19-year-old opener, made 45 on his ODI debut, driving through the covers with a fluent, left-handed flourish and pulling confidently when the bowlers dropped short. Replacing Sarfraz Ahmed - who handed the keeping gloves to Mohammad Rizwan - Aslam barely put a foot wrong in his 50-ball innings before a sharply bouncing offbreak from Nasir Hossain brushed his bottom thumb through to the keeper.
There was certainly help on the pitch for the spinners - who eventually bowled 31 of the 49 overs Bangladesh sent down, despite their attack containing three frontline seamers - and this was evident during Mohammad Hafeez's brief and ill-at-ease stay at the crease. Having had his footwork tested by Shakib Al Hasan's turn and changes of pace in the previous over, he was bowled slogging across the line at an Arafat Sunny arm-ball.
But the threat of the spinners was subdued when Azhar and Haris batted. Nudges and nurdles off his pads formed the bulk of Haris' innings, but he also stepped down the track and struck the spinners for two heart-in-the-mouth sixes - one just out of reach of deep midwicket, one just out of reach of long-on.
It was Azhar who held centrestage as he completed the first ODI century by a Pakistan captain in nearly five years. The travails of Misbah-ul-Haq, Azhar's predecessor, are well known - he made 42 fifties and no hundred in 162 ODIs - but Pakistan captains have traditionally struggled to reach three figures. This was Pakistan's 840th ODI, but Azhar's hundred was only the tenth by one of their captains.
Azhar's innings showcased the same strengths he has displayed right through this series. He put away the short balls with clinical placement, easily finding the gap between point and third man with his square cut. Perhaps more importantly, he rotated the strike well, failing to score off only 49 out of 112 balls. It's been a trend right through the series.
Azhar didn't play the World Cup, in which Pakistan often played on challenging pitches, so a direct comparison with the batsmen who did may not be entirely accurate. Nonetheless, it must mean something that Azhar is the only Pakistan batsman with a dot-ball percentage below 50 among the six who have faced 150 balls this year. Ahmed Shehzad, the batsman he replaced, is at the opposite end of that list at 64.79.
Against the spinners, Azhar was sure-footed and inventive. This was best seen when he took two fours in one over off Nasir Hossain's offspin, first stepping out to lift him over mid-off and then leaning back to dab him fine to the third man boundary. When he brought up his century in the 38th over, tucking Mashrafe Mortaza off his pads for a couple, Pakistan were 202 for 2 and on course for 300.
But four balls after a Shakib arm ball had consumed Azhar, Haris was gone too, swiping across the line of a slower ball from Mashrafe. The slowness of the pitch was suddenly apparent again, and Bangladesh were in a position to make use of it, with seven overs of Shakib, Sunny and Mashrafe to go at the 40-over mark.
Still, some of the dismissals were inexplicable. Like Haris, Fawad slogged across the line at Mashrafe. Wahab Riaz and Saad Nasim picked out fielders in the 30-yard circle with half-hearted attempts at big hits. Rizwan popped a return catch to Shakib, looking to work across the line of a slow back-of-a-length ball.
In his first series as ODI captain, playing the format after nearly two years out of the side, Azhar has seen Pakistan lose their first series to Bangladesh. Now, even the consolation of a big total in a dead rubber was slipping away.