Dhaka - The Tigers just beat Australia in Test cricket for the first time ever.
Overnight batsman David Warner struck a belligerent 112 and added 130 runs with skipper Steve Smith but their efforts were in vain as the hosts took a 1-0 lead in the two-match series.
Chasing 265 to win, Australia lost five wickets in an eventful morning session, and whatever hopes they had were snuffed out when Shakib bowled Glenn Maxwell with the first delivery after the lunch break.
Pat Cummins scored an unbeaten 33 down the order to inject some drama but it was not enough in the end as Australia were all out for 244.
Bangladesh captain Mushfiqur Rahim was delighted to record the country's first victory over Australia.
"Obviously a great feeling, beating Australia," he said at the presentation ceremony.
"A great effort by the boys, especially Shakib and Tamim (Iqbal) were outstanding," he said of the duo, who featured in a 155-run partnership to rescue Bangladesh from a top order collapse in their first innings.
Shakib (5-85) celebrated his 50th test appearance by scoring 84 in the first innings and finishing with a 10-wicket match haul, a performance worthy of his status as the world's top-ranked test all-rounder.
He was the obvious choice for Man of the Match.
Resuming on 109-2, Warner batted with calculated aggression, while Smith was content to play second fiddle as they continued the good work they had started on Tuesday evening with some generous assistance from Lady Luck.
Warner survived a review before the southpaw brought up his 19th test century, a second in Asia. Then, when the opener was on 106, he pulled a Shakib delivery and the ball flew past leg-slip before the fielder could put his hands together.
Smith was on 28 when Tamim spilled him at mid-on but Shakib was lurking round the corner with his left-arm spin to change the complexion of the match.
Shakib first trapped Warner leg-before for 112 and, four overs later, had Smith caught behind for 37 to pile the pressure back on Australia.
On a turning track where their frontline batsmen have struggled against Bangladesh's three-pronged spin attack, Peter Handscomb, Matthew Wade and Ashton Agar all fell in quick succession prior to lunch.
Cummins hit a couple of sixes in his aggressive innings but ran out of partners after Taijul Islam trapped Josh Hazlewood leg-before.
Smith said failing to pile up runs in the first innings had made their job tougher.
"It was a great test match, credit to Bangladesh the way they played," he added.
"We probably let ourselves down in the first innings with the bat, probably should have made a few more there. It was pretty difficult batting here in the second innings and I thought we did pretty well to get 240 in the end."
Australia will slip one place to fifth in the test rankings even if they level the series by winning the second test in Chittagong from Monday. A second defeat would see them lose another place.Scoreboard
Our Honorable Prime Minister greeting our Man of the Match @Sah75official pic.twitter.com/nQctcvSPmx
- Bangladesh Cricket (@BCBtigers) August 30, 2017