HANOI—India on Saturday agreed to provide Vietnam with a $500 million loan for defense purposes, a further sign of warming ties between two countries in separate territorial disputes with China.
Prime Minister Narendra Modi and his Vietnamese counterpart Nguyen Xuan Phuc also announced after their meeting in Hanoi that Vietnam and India have upgraded their diplomatic relations to the level of comprehensive strategic partnership from strategic partnership.
“Our decision to upgrade our strategic partnership to a comprehensive strategic partnership will provide a new direction and momentum to our bilateral cooperation,” Mr. Modi said. “Our common efforts will also contribute to stability, security and prosperity in this region.”
The alliance between India and Vietnam is set to develop further in the wake of Mr. Modi’s visit. India is negotiating to sell supersonic Brahmos cruise missiles to Vietnam, a deal that might also include the stationing of Indian technicians there to maintain the hardware.
Defense analysts say the weapons are ideally suited to taking out naval targets. In seeking to upgrade military capabilities as China improves its own capabilities, Vietnam has emerged as the world’s eighth-largest arms importer from 2011 to 2015, according to the Stockholm International Peace Research Institute.
Military cooperation between the two countries has moved forward quickly over the past decade. There have been several high-ranking military exchanges, and in 2014 India signed an agreement to lend Vietnam $100 million to buy defense equipment.
Indian warships have also made a point of visiting Vietnamese ports, part of Hanoi’s own policy of encouraging more international navies into the contested waters of the South China Sea, where both Vietnam and China have overlapping claims to some of the world’s busiest shipping lanes. New Delhi, in turn, has made Vietnam a focal point of its policy to expand its economic and diplomatic ties in East Asia.
Vietnam and India on Saturday also signed an agreement for India’s Larsen & Toubro Ltd. to design and build vessels for the Vietnam Coast Guard, and to transfer shipbuilding technologies to Vietnam. The two countries also signed several other cooperation agreements, covering cybersecurity, information technology, health care, environment and naval-information issues.
The commercial relationship between India and Vietnam—two of Asia’s fastest-growing economies—is also deepening, aiming to triple trade to $15 billion by 2020. Indian energy firm ONGC Videsh Ltd. is working with Vietnam’s state-run oil company PetroVietnam to develop oil and gas reserves off Vietnam’s coast.
Preeti Saran, a senior official in India’s foreign ministry, told reporters in New Delhi on Thursday that negotiations have started for Indian energy firms to acquire additional exploration rights in Vietnamese waters. She also pointed to Tata Power Co.’s $1.8 billion thermal-power project in Vietnam as a key to placing India among the top 10 investors in Vietnam.
Still, China’s expanding influence both in the South China Sea and the Indian Ocean colors Mr. Modi’s visit. India, too, has its own territorial dispute with China, with the two nations disagreeing on the exact location of the nearly 2,200-mile border that separates them.
Carlyle Thayer, emeritus professor and a Vietnam expert at the Australian Defence Force Academy, notes that the Indian leader’s visit to Vietnam follows high-level Chinese visits to Pakistan last year, where China is helping to finance the development and expansion of the deep-water port at Gwadar on the Arabian Sea. The port is an important component in Beijing’s efforts to expand trade and influence across Asia and into the Middle East and Africa.
Mr. Modi leaves Vietnam today for Hangzhou, China, where he will join U.S. President Barack Obama, Chinese President Xi Jinping and other world leaders for the Group of 20 summit.
—Niharika Mandhana in New Delhi contributed to this article.
Write to Vu Trong Khanh at Trong-Khanh.Vu@dowjones.com