Japanese Defence Minister and Sri Lankan Prime Minister in a meeting Colombo on 21 August, 2018. (AFP)

Japan has pledged to help strengthen Sri Lanka's maritime security, authorities said Tuesday, in a new sign of efforts to counter China's strategic grip on the Indian Ocean island.

President Maithripala Sirisena thanked Japan's Defence Minister Itsunori Onodera for donating two coast guard patrol craft costing over $11 million in total, his office said in a statement after talks in Colombo.

"Attention has been drawn to further strengthening maritime security cooperation between Japan and Sri Lanka," the statement said.

The visit came a week after the US State Department gave $39 million to strengthen the island's naval capabilities.

Sirisena said he was happy that Onodera, the first Japanese defence minister to visit, was travelling to two strategic ports on the island.

Onodera will visit Hambantota, which Colombo in December 2017 leased to a Chinese state-owned company for 99 years.

The government said it was forced to lease the port for $1.1 billion because it could not service loans from Beijing to build the white-elephant facility agreed by former president Mahinda Rajapakse.

Hambantota, 230 kilometres (143 miles) from Colombo, straddles the world's busiest east-west shipping route.

The Japanese minister will also visit Trincomalee, a natural harbour that was the target of Japanese bombing during World War II.

China has edged out Japan as a key funder of ports and other projects in the island in recent years. Sri Lanka has become a key link in its ambitious "Belt and Road" international infrastructure initiative.

China has also vowed to keep providing financial help to Sri Lanka. The International Monetary Fund, which bailed out Sri Lanka in 2016 with a $1.5 billion loan, has warned Colombo over its debt.