HANOI, Vietnam — Indian Prime Minister Narendra Modi has offered Vietnam a loan of $500 million to strengthen its defense capacity amid China’s intensifying presence in the disputed South China Sea.

The so-called “Line of Credit” was announced after Modi’s talk with Vietnamese Prime Minister Nguyen Xuan Phuc during his official visit to Hanoi, a day before he is scheduled to travel to China to attend the G-20 summit.

Military cooperation tops the discussions between Modi and Phuc.

A dozen agreements were signed, including one on cooperation of Indian and Vietnamese navies and a contract between an Indian shipbuilder and Vietnam’s coast guard.

India, which also has a border dispute with China, has been vocal on the issues in the South China Sea, calling for freedom of passage in the international waters.