TOKYO—Japan sent a submarine to join three destroyers in an exercise in anti-submarine warfare in the South China Sea, strengthening the resistance by U.S. allies to China’s military expansion.

The submarine, the Kuroshio, joined the warships on Thursday before heading for a port call at the Vietnamese naval base in Cam Ranh Bay, the first such visit by a Japanese submarine, Japan’s Defense Ministry said.

The statement was the first public disclosure by the ministry of a submarine exercise in the South China Sea.

“It’s part of a strategic message that Japan would like to send to China and the countries in the region,” said Narushige Michishita, a professor specializing in international security at the National Graduate Institute for Policy Studies in Tokyo. “It’s a demonstration of Japan’s will to maintain a balance of power.”

Mr. Michishita called it “very significant” that Japan was practicing its anti-submarine warfare capability because China operates nuclear-powered submarines that can fire ballistic missiles.