Bangladesh 565 (Mushfiqur 191, Naseem 3-93) and 30 for 0 (Zakir 15*) beat Pakistan 448 for 6 dec (Rizwan 171*, Shakeel 141) and 146 (Rizwan 51, Mehidy 4-21, Shakib 3-44) by ten wickets
Bangladesh beat Pakistan for the first time in Test cricket by completing a 10-wicket win in Rawalpindi after the hosts' second-innings collapse.
Mushfiqur Rahim's 191 from 341 balls gave the Tigers a first-innings lead of 117, as they racked up 565 in response to Pakistan's 448-6 declared.
The hosts slumped to 146 all out in response, leaving a target of just 30 to win, which Bangladesh reached inside seven overs.
Muhammed Rizwan top-scored for Pakistan with 51 but spinners Mehidy Hasan Miraz and Shakib Al Hasan took seven wickets between them to set up the win on day five.
Openers Zakir Hasan and Shadman Islam knocked off the runs comfortably with 15 and nine not out respectively to seal only Bangladesh's second overseas Test win in seven years.
Pakistan's first-innings effort was led by Rizwan's 171 not out and Saud Shakeel's 141 - their mammoth stand of 240 rescuing their side from a precarious 114-4.
But they were eclipsed by Mushfiqur's knock with support from opener Shadman's 93 and half-centuries for Mominul Haque and Litton Das, while Mehidy's 77 added to a fine all-round performance.
The defeat means Pakistan have not won a Test match on home soil since February 2021, with four defeats and five draws since.
The second and final Test begins in Karachi on Friday, 30 August.
England are due to tour Pakistan for three Tests in October.