Traffic at the Maritime Self-Defense Force base at Sasebo, Nagasaki Prefecture, is typically dominated by Japanese and U.S. warships, but in July it saw an unusual variety of vessel. An Indian frigate and destroyer docked en route to joint exercises in the Western Pacific.

The INS Shivalik and INS Ranvijay’s appearance at the port near Nagasaki showed Japan’s interest in developing ties with the South Asian nation as Prime Minister Shinzo Abe’s government faces deepening tensions with China. Japan for the third time joined the U.S. and India in the annual Malabar drills that usually are held in the Bay of Bengal.

With Abe loosening limits on his nation’s military, the exercises that conclude Wednesday showcase Japan’s expanding naval profile as China pushes maritime claims in disputed areas of the East and South China Seas. For newly installed Indian Prime Minister Narendra Modi, Japan’s attention adds to that of China itself, in an opportunity to expand his own country’s sway.

“Modi’s government is seen by the rest of Asia as being able to deliver on its promise of economic growth and reforms and that provides the depth and gives new impetus for strategic relations in Asia,” said Srikanth Kondapalli, a professor in Chinese studies at Jawaharlal Nehru University in New Delhi. “India’s power in Asia will rise — economic and maritime power related to trade, energy and military. Japan and other Asian countries realize this.”

Japan’s involvement in Malabar underscores its interest in helping secure its trade routes to Europe and the Middle East. The Indian Ocean is “arguably the world’s most important trading crossroads,” according to the Henry L. Stimson Center, a foreign policy research group in Washington. It carries about 80 percent of the world’s seaborne oil, mostly headed to China and Japan.

Inviting Japan to join the annual U.S.-India naval drill fuels an already strained relationship between Japan and China, whose ships and aircraft have been involved in a dispute over an East Asian island chain that has escalated in the past two years. Malabar started in 1992 and has been held annually since 2002. Japan first joined in 2007, when ships from Singapore and Australia also took part.

This year, India sent three vessels to the maneuvers, which included drills to enhance anti-piracy and maritime patrol capabilities.

“It’s very significant that we can do this drill with the U.S. and India, not only with a view to the Pacific Ocean but also the Indian Ocean, where our sea lanes stretch,” MSDF chief Hidetoshi Iwasaki said at a press conference on July 24th, the first day of the exercise.

All three national commanders for the joint fleet denied that the exercise was connected to any territorial dispute.

“We don’t have any drill concerning island defense,” said Iwasaki, adding that the intention is only to enhance combat skill and the ability of the navies to work together.

The U.S. contingent included the aircraft carrier USS George Washington, together with a cruiser and destroyers.

The navies of Japan and India cooperated in a binational exercise from the Japanese port of Sagami in 2012 and the Indian city of Chennai last December. China began its own five-day military drill in the East China Sea on Tuesday, the nation’s Ministry of National Defense said in a statement on its website.

Japan’s tightening diplomatic ties with India add to a budding economic relationship as Japanese companies seek alternatives to China. In 2012, anti-Japanese protests broke out all over China, damaging factories and shops and boycotting Japanese goods. The protests were sparked by the Japanese government buying some of the disputed islets from a private citizen.

“The Japanese are facing huge political problems in China,” said Kondapalli in a phone interview. “So Japanese companies are now looking to shift to other countries. They’re looking at India.”

There are 1,300 to 1,400 Japanese companies in India compared with 80,000 in China, he said.

India offers one of the best investment opportunities among eight of the biggest markets worldwide, according to the Bloomberg Global Poll this month. Among the so-called BRIC nations, 23 percent of respondents picked India, versus the 12 percent average for Brazil, Russia and China, the widest gap since the survey began in 2009.

Modi is planning to visit Tokyo and will give a joint statement with Abe on Sept. 1, Kyodo News reported on Saturday. A previous scheduled meeting between the two earlier this month in Japan was postponed because of preparations for India’s budget, Press Trust of India reported on July 23.