Pakistan's Abid Ali fell nine runs short of a second consecutive century as the visitors chased down a target of 202 on Tuesday to win the first test in Chittagong by eight wickets and take the lead in the two-match series against Bangladesh.
Abid, who scored 133 in Pakistan's first innings, and Abdullah Shafique stitched together a 151-run opening partnership in the second innings to put Pakistan within touching distance of victory on day five of the test.
Pakistan looked like they would cruise to a 10-wicket win, but Mehidy Hasan trapped debutant Abdullah leg-before on 73 to ease the margin of defeat.
Abid lost his wicket six overs later, when Taijul Islam rattled his pads to get him out leg-before.
"Abdullah Shafique was making his debut, so we tried to stay on the crease, waited for bad balls and succeeded in putting those away," Abid said.
"I had done well in domestic cricket and carried that positive mindset here too. Abdullah played really well, I gave him more credit.
"I am a bit disappointed that I got out for 91 in the second innings but at the same time I am happy that we won the match."
Azhar Ali (24 not out) and Babar Azam (13 not out) then combined to guide Pakistan over the finish line.
The second test in Dhaka starts on Dec. 4
Watch the latest DH Videos here: