India is eager to regain Sri Lanka as a customer for defense products. During the two decades of civil war in Sri Lanka, with the Tamil minority seeking to partition the island, India was in a difficult position, Most Tamils live in the south Indian state of Tamil Nadu, and Tamil politicians generally backed the Sri Lankan Tamils. This made it difficult for India to supply all the weapons Sri Lanka wanted. So Sri Lanka sought arms from other sources, and the two that were most willing were rivals of India; Pakistan and China.
India did not cut off Sri Lanka entirely. Many Indians backed Sri Lanka's effort to maintain itself as a unified state. After all, the Tamil rebels in Sri Lanka, the LTTE, were big fans of terrorism and assassination. One of their victims had been a former Indian prime minister. So India was able to assist Sri Lanka to halt LTTE weapons smuggling. This was done by increasing naval patrols between India and Sri Lanka, and seeking out and arresting LTTE agents in India. When Sri Lanka needed air defense radars and patrol boats, in a hurry, India came through. India also sold them two warships. Early on in the civil war, India sent several thousand peacekeepers. But this backfired when the LTTE turned on them. But now India is making a major effort to be a good neighbor and potential arms supplier. Recently, India sent 500 army engineers to help clear LTTE mines from northern Sri Lanka. Seemingly in response, Sri Lanka has cancelled $200 million in weapons orders from Pakistan and China. But Sri Lanka says, with some justification, that this is more the result of the LTTE having been defeated earlier this year. Sri Lanka no longer needs all those weapons and ammunition.
Sri Lanka is also aware that India is alarmed at the growth of Chinese naval power, and Chinese efforts to establish bases in the Indian ocean. Most of China's oil imports pass through the Indian ocean, as do many Chinese exports. It was thought that China's eagerness to help Sri Lanka was part of this strategy, and that here were hopes that Sri Lanka would allow Chinese warships to operate out of Sri Lanka. India will go a long way to stop that from happening, and Sri Lanka appears willing to let India demonstrate an eagerness to please. Sri Lanka would rather have warm relations with India, than get caught in the middle of an Indo-Chinese struggle for control of the Indian Ocean.