Sri Lanka and India have pledged to strengthen military ties and widen maritime links with neighbours after security talks, the president's office said on Sunday, as New Delhi moves to counter Chinese influence in the region.

China, a longtime regional rival of India, has been widening its footprint in the region, including building ports and expressways and upgrading airports in Sri Lanka and the Maldives.

India's National Security Advisor Ajit Doval met on Saturday with recently elected Sri Lanka President Gotabaya Rajapaksa and discussed setting up a maritime research coordination centre, Rajapaksa's office said in a statement.

It did not give details of the proposed centre but said other nations in the region should be included as observers.

It said the two countries also discussed closer military and coastguard cooperation.

'Geography a big advantage for India'

"Sri Lanka-India military ties go back a long way so it's nothing new, but what is important is clearly a greater incentive for these ties because of the China factor," said Jabin Thomas Jacob, Associate Professor at Shiv Nadar University in Noida, India.

"India cannot match China in terms of economic clout but geography is a big advantage for India, therefore India's neighbours have to take that into account."

The meeting followed Gotabaya's visit to New Delhi last November for talks with Prime Minister Narendra Modi, who offered $450m in aid to Sri Lanka after his landslide victory in the presidential election.

Sri Lanka has been facing an economic and debt crisis, and a series of attacks last April wiped out its vibrant tourism sector plunging the South Asian island nation into further economic and security uncertainty.

Local media reports said Gotabaya will travel to China - his second foreign visit since coming to power - while his brother, Prime Minister Mahinda Rajapaksa will visit India on his first overseas trip.

No exact dates have been announced, but official sources said it could happen within weeks.

Chinese investments in Sri Lanka

Sri Lanka has traditionally been allied to India, but China invested and loaned billions of dollars to the island nation during the decade-long (2005-2015) reign of Gotabaya's elder brother, Mahinda, who presided over the defeat of Tamils separatists in 2009.

Sri Lanka’s foreign policy was tilted heavily towards China under Mahinda, who fell out with the West over human rights and allegations of war crimes at the end of the civil war.

Chinese investments had grown under the previous Colombo government too.

On Tuesday, China's Foreign Minister Wang Yi held talks with President Gotabaya during a brief transit stop in Colombo and the two men discussed the president's impending Beijing visit.

"As Sri Lanka's strategic partner, China will continue to stand by Sri Lanka's interests," Gotabaya's office quoted Wang as saying.

The visit will focus on technology, tourism and infrastructure as well as other areas, the president's office said last week.

Gotabaya in December warned India and Western nations that Sri Lanka would be forced to seek more finance from China if they do not invest in the island.

Sri Lanka was forced to hand over the strategic Hambantota port south of Colombo to China in 2017 on a 99-year lease after the government at the time said it was unable to repay loans taken to build it.

Bilal Kuchay contributed to this report from New Delhi