MS Dhoni scored three runs off the final ball of the match as India tied with Sri Lanka in their latest CB Series clash in Adelaide.
Set 237 to win, the World Cup winners needed four off the last ball to win but Dhoni could only manage three as he scooped the ball towards the cover boundary to prevent the Sri Lankans claiming their first win of the tournament.
Sri Lanka's total of 236-9 looked competitive but not imposing and was built around an exciting 81 by Dinesh Chandimal, with Kumar Sangakkara (31) and skipper Mahele Jayawardene (43) also making useful runs.
Vinay Kumar with 3-36 was the most successful Indian bowler while Ravi Ashwin claimed 2-30 from his 10 overs.
Gautam Gambhir made a well-paced 91 at the top of the order in the Indian run chase but was run out when closing in on his century, while a number of batsmen got starts but failed to go on and support the opener.
It was left to the captain, who had performed heroics in India's victory over Australia last time out, and he responded with an unbeaten 58 from just 69 balls.
But he could not find the ropes with his final shot of the match and the sides had to settle for share of the spoils in South Australia.