Mehidy Hasan Miraz hit his maiden one-day international century and took two key wickets as Bangladesh prevailed in a five-run win over India on Wednesday.

Bangladesh take an unassailable 2-0 series lead going into Saturday's final match.

The all-rounder Miraz made an unbeaten 100 and put on 148 runs for the seventh wicket alongside Mahmudullah Riyad to pull Bangladesh out from a precarious 69-6 and post 271-7 in Dhaka.

India skipper Rohit Sharma batted at number nine with an injured thumb and hit an unbeaten 51 off 28 balls to give Bangladesh a scare as India ended on 266-9 in 50 overs.

"Feeling very happy. Winning the series as captain - it's a dream come true," skipper Liton Das, who led Bangladesh in his first ever ODI series after regular captain Tamim Iqbal missed out due to injury, said after the triumph.

Liton added: "We lost six wickets but the way Miraz and Riyad bhai played was outstanding."

Rohit, who hit five sixes in his blitz and needed a six to win on the final ball when Mustafizur Rahman held his nerve, had gone for scans after he took a hit while attempting a catch at slip in Bangladesh's innings.

- No fracture -

Rohit dropped Bangladesh opener Anamul Haque in the second over of the match as the ball seemed to caught his webbing between the thumb and first finger with blood oozing out as he walked off the field.

"Honestly, the thumb is not too great," said Rohit. "Some dislocation on the finger, but not a fracture, which is why I could come and bat."

Mehidy, who opened the bowling with his off spin, returned figures of 2-46 as he struck with the wickets of KL Rahul, out lbw for 14, and Shreyas Iyer, who top-scored with 82.

Fast bowler Ebadot Hossain stood out with three wickets including Virat Kohli bowled for five and later cut short the left-handed Axar Patel's knock on 56.

But Mehidy and former captain Mahmudullah set up victory with the highest seventh-wicket stand against India by any team in 50-over matches as thwarted an inspired bowling attack.

India's Mohammed Siraj led the attack after he removed the openers and fellow quick Umran Malik, who also took two, soon joined forces to push Bangladesh onto the backfoot.

Mystery spinner Washington Sundar struck three times in seven deliveries including the key wickets of Shakib Al Hasan (eight) and Mushfiqur Rahim (12).

Mehidy, who starred in his team's opening win by one wicket, hit back and reached his third ODI fifty and soon after Mahmudullah got his 27th half-century. The duo then shifted gears with regular boundaries.

Umran, a tearaway quick, finally got Mahmudullah caught behind but Mehidy kept up the charge to reach his hundred on the final ball of the innings in an unbeaten stand of 54 with Nasum Ahmed, who made 18.

Bangladesh were winning their second successive series against India after they got past them in their previous meeting at home in 2015.