Virat Kohli hit an unbeaten 139 to guide India to a nervy three-wicket win over Sri Lanka to seal a 5-0 series whitewash.

The tourists looked good to end the tour on a winning note after Angelo Mathews hit his maiden ODI century as Sri Lanka posted 286-8 off their quota.

Mathews hit six fours and 10 sixes in his 116-ball knock before picking up two quick wickets to leave the hosts reeling at 14-2.

However, Kohli shared a 136-run third-wicket partnership with Ambati Rayudu and held up one end as wickets tumbled at the other to guide his side past Sri Lanka total.

"Unfortunately we did not play good cricket once again and India did play very well," said Mathews.

"We batted pretty well and 287 was a huge score on this pitch. But Kohli batted very well and best of luck to them in Australia. We got to flush this out of the system as soon as possible and need to gear up for the England series."

India fly off to Australia in 48 hours while Sri Lanka will now host England as the teams prepare for next year's World Cup that starts on February 14.

Scorecard:

Sri Lanka 286-8 in 50 overs (Mathews 139*, Kulkarni 3-57)

India 288-7 in 48.4 overs (Kohli 139*, Mendis 4-73)