COLOMBO, Sri Lanka—India’s premier, looking to increase New Delhi’s influence and blunt inroads by China in the Indian Ocean region, on Friday pledged to deepen economic and military ties with southern neighbor Sri Lanka, which in recent years has relied heavily on funding from Beijing for development projects.

In a speech to Sri Lanka’s Parliamentat the start of a two-day visit to the island nation, which lies across a narrow strait from India, Narendra Modi said, “The security of our two countries is indivisible....