Bangladeshi allrounder Shakib Al Hasan followed his four wickets with a fighting 97 to delay West Indies' likely win in the second and final Test in Khulna on Saturday.
The 25-year-old left-hander missed his third Test hundred by a mere three runs but carried the home team from a precarious 82-5 to 226-6 at close on the fourth day, still needing 35 to avoid an innings defeat.
Shakib fell off the first ball of the penultimate over of the day, miscuing a lofted shot off left-arm spinner Veerasammy Permaul and was caught at mid-off for a simple catch to Tino Best.
Shakib added a new Bangladesh versus the West Indies record of 144 for the sixth wicket with Nasir Hossain who supplemented the fight with an aggressive 64 not out.
Paceman Best (3-26) had put the West Indies on course for an innings victory with a triple strike in the post lunch session but Shakib and Nasir ensured Bangladesh do not go down without a fight.
Best had opener Tamim Iqbal (28) with the first ball of his first over, then rattled Naeem Islam's stump with a sharp incoming delivery with his fourth ball before dismissing Shahriar Nafees (21) in his third over.
Bangladesh were off to a disastrous start when opener Nazimuddin was trapped leg-before for nought off paceman Fidel Edwards's third ball of the innings.
Iqbal and Nafees took the score to 49 with the help of eight boundaries between them before Best was introduced.
Captain Mushfiqur Rahim was bowled for ten by Permaul who took 2-51.
Shakib and Nasir then batted with confidence, improving the previous best sixth wicket stand of 87 against the West Indies, between Rahim and Nasir in the first innings here.
Earlier, Shakib became only the second Bangladeshi bowler to complete 100 wickets in Test cricket as he dismissed four batsmen in the morning session before the tourists declared on 648-9 after resuming at 564-4.
West Indian batsman Shivnarine Chanderpaul remained unbeaten on a brilliant 150. The experienced left-hander held the innings, hitting 12 fours and a six off 282 balls. He also hit 203 not out in the first Test.
It was the West Indies's highest total in a Test against Bangladesh, improving on the 559-4 declared they managed at Kingston eight years ago.
Shakib had Denesh Ramdin caught behind off a wild shot for 31 and then two balls later forced an edge off Darren Sammy which was well caught by Mohammad Mahmudullah in the slips to complete his 100 Test wickets.
He then removed Permaul (13) and Sunil Narine in the last over before lunch to finish with 4-151.
Left-arm spinner Mohammad Rafique was the only other Bangladeshi bowler to get 100 wickets in Test cricket.