TOKYO — A Japanese submarine participated in war games in the South China Sea last week and is now visiting Vietnam, signaling a more assertive pushback by Japan against China’s territorial claims in the region.

Japan took the unusual step on Monday of announcing that it had carried out the drills, which also involved two destroyers and a helicopter carrier. The Ministry of Defense said the exercises were not targeting a particular nation, but analysts said they were an unequivocal message to China.

“We are sending a signal that China cannot just do whatever it wants to do and get away with it,” said Narushige Michishita, director of the Security and International Studies Program at the National Graduate Institute for Policy Studies in Tokyo.

The drills were the first involving a submarine that Japan is known to have conducted in the South China Sea. Neither the Defense Ministry nor the Asahi Shimbun newspaper, which broke the news before the announcement, said where in the sea they had been carried out.