Mehidy Hasan Miraz hit an unbeaten 38 and put on a record tenth-wicket stand as Bangladesh edged out India by one wicket in a thrilling opening one-day international on Sunday.

Chasing 187 for victory, the hosts fell to 136-9 before Mehidy and Mustafizur Rahman put together a 51 run partnership -- Bangladesh's best ever for the final wicket -- to achieve their target with 24 balls to spare in Dhaka.

Bangladesh lead the three-match series 1-0 with the second match on Wednesday at the same venue.

Mehidy, coming in to bat at number eight, hit four fours and two sixes and survived a dropped catch by wicketkeeper KL Rahul on 17 to turn the match on its head.

Mehidy hit the winning runs in his 39-ball knock to trigger wild celebrations as the players came running onto the field and the home crowd erupted.

Mustafizur scored 10 off 11 balls as he and Mehidy stood firm to record a memorable win.

Shakib Al Hasan set up victory after his impressive bowling figures of 5-36 helped bowl out India for 186 in 41.2 overs despite Rahul's 73 after Bangladesh elected to field first.

Bangladesh collapsed after a few good partnerships including a 48-run stand between skipper Liton Das and Shakib, who made 29.

Spinner Washington Sundar got Das out for 41 and then Shakib to a stunning one-handed catch at extra cover by Virat Kohli.

Bangladesh suffered a double blow in successive balls when Mahmudullah Riyad and Mushfiqur Rahim fell after a 33-run stand for the fifth wicket.

Bangladesh looked to be cruising at 128-4 in the 35th over, but lost their way after Mahmudullah fell lbw to Shardul Thakur and then Mohammed Siraj bowled Mushfiqur.

Debutant fast bowler Kuldeep Sen came back to pick up two wickets in the first over of his second spell to send back Afif Hossain and Ebadot Hossain.

Siraj snapped up Hasan Mahmud for his third wicket but Mehidy, who also got one wicket with his off spin, did the unthinkable with Mustafizur for company.

Earlier Rahul stood out for India with his 70-ball knock but the rest of the tourists batting disappointed.

Rahul, who came in as wicketkeeper-batsman after regular glovesman Rishabh Pant was ruled out of the series due to injury, smashed five fours and fours sixes.

Pace bowler Ebadot claimed four wickets including Rahul and the final wicket to wrap up the opposition innings in 41.2 overs.