Marlon Samuels kept West Indies in their one-day series against Bangladesh with a superb 126 as they won the third match by four wickets in Dhaka.
The hosts lost the toss and were grateful for Mahmudullah's innings of 52 as they were bowled out for 227 in the last over, spinner Sunil Narine taking four for 37.
The Windies started strongly and, despite a wobble which saw them lose three wickets for 24 runs, Samuels wrested back the initiative by taking 24 from a Rubel Hossain over as he led them to a result which leaves them 2-1 down in the five-match series.
After a stand of 57 between Tigers openers Tamim Iqbal (22) and second-Test centurion Anamul Haque (33), Narine did the early damage by removing Tamim and Naeem Islam (four) in his first over and Anamul in his next.
Nasir Hossain (six) became Veerasammy Permaul's first ODI victim but Mushfiqur Rahim put on 32 with Mominul Haque and 58 with Mahmudullah.
Wicketkeeper Mushfiqur advanced to 38 before top-edging a sweep at Permaul (two for 40) straight to rival captain Darren Sammy but Mahmudullah hit three fours and a six in his half-century.
He put on 39 with Sohag Gazi before driving Dwayne Smith to Sammy at mid-off. Gazi was last out for 30 when he crashed Sammy (two for 46) straight to extra cover.
After losing Chris Gayle for only four, the Windies quickly got their chase on track as Kieron Powell and Marlon Samuels put on 111 for the second wicket despite some sharp turn posing occasional problems.
Samuels was on 42 as the stand passed 50 from 58 balls, and soon afterwards reached his personal half-century from 53 with nine fours.
The century stand arrived in 121 balls before Powell, who had contributed 27 of those runs, came out of his shell. Having reached 47, though, he came down the wicket to Mahmudullah but missed and was stumped by Mushfiqur.
But Mahmudullah's next over summed up Bangladesh's struggles with two wides, the first of which went to the boundary, and a four straight through Mashrafe Mortaza at deep square leg.
Mahmudullah then dropped Darren Bravo off Naeem Islam but when the same batsman edged Islam to Gazi at backward point, it sparked a minor collapse.
Smith (four) and Pollard (one) fell in consecutive Abdur Razzak overs to leave the tourists on 182 for five, still needing 46.
But Samuels pressed on to a 141-ball ton with a boundary off Rubel - the start of an astonishing over in which he hit three fours and two sixes to swing the game decisively back in his side's favour.
He was caught as he tried to hit the decisive six, ending a superb 149-ball innings featuring 17 fours and those two sixes, but Devon Thomas and Sammy finished the job.