Mohammad Nawaz struck a boundary off the last ball as Pakistan overcame late drama to beat Bangladesh by five wickets in Monday's third Twenty20 international for a series whitewash.
The visitors seemed to be coasting in Dhaka after restricting the hosts to 124-7 before Bangladesh skipper Mahmudullah Riyad conjured up late excitement in the final over.
With Pakistan needing eight runs for victory, Mahmudullah took two wickets in two balls.
Iftikhar Ahmed struck the fourth ball for a six to deny Mahmudullah and put victory back within grasp before going out with only one left to bowl.
Nawaz came to the rescue to take Pakistan to 127-5 and break Bangladesh's heart.
Mahmudullah, who finished with 3-10, rued their total earlier with the bat.
"Batters from both teams struggled a bit," Mahmudullah said at the end of the match. "(We) needed to spend some time at the crease to capitalise."
Pakistan skipper Babar Azam was dismissed for 19 while Mohammad Rizwan's 51-run partnership with Haider Ali gave the tourists an early boost.
Debutant Shahidul Islam bowled Rizwan for 40 to break the stand but Haider took Pakistan close with 45 off 38 balls before he became Mahmudullah's first victim in the final over.
Pakistan bowlers earlier kept any momentum in check after the hosts elected to bat first.
Debutant Shahnawaz Dahani bowled Najmul Hossain for five in the second over of the innings before Mohammad Wasim and Usman Qadir rattled the hosts.
Wasim claimed 2-15 and Qadir finished with 2-35 playing his first match in the series.
Pakistan won the first two matches by four and eight wickets respectively.
Babar credited team spirit for the series clean sweep.
"The way every individual has performed, credit to the group. There is always scope for improvement," he said.
The visitors will now play two Test matches, starting in Chittagong on 26 November.
Find latest and upcoming tech gadgets online on Tech2 Gadgets. Get technology news, gadgets reviews & ratings. Popular gadgets including laptop, tablet and mobile specifications, features, prices, comparison.
Follow live scores and updates from Day 2 of the second New Zealand vs Bangladesh Test.
It is the first time Bangladesh have won in New Zealand, and Mominul could not contain his emotion when Mushfiqur Rahim clouted a boundary off Kyle Jamieson to seal the famous victory
It was also New Zealand's first loss in 16 home Tests over the past four years.