TOKYO — Japan and Indonesia signed a pact on Tuesday allowing the transfer of Japanese defense equipment and technology to Jakarta as the two countries strengthen their military ties in the face of China’s increasingly assertive activity in the region.

The agreement came during “two plus two” security talks among the foreign and defense ministers of the two countries, which share concerns about China’s growing influence and territorial claims in the East and South China seas.

“It has become difficult to take for granted the premises that have supported the peace and prosperity of the international community,” Japanese Foreign Minister Toshimitsu Motegi said in opening remarks at the talks.

Motegi and Defense Minister Nobuo Kishi and their Indonesian counterparts, Retno Marsudi and Prabowo Subianto, also agreed to actively participate in multinational military exercises and jointly develop remote islands in the South China Sea.

The ministers “shared grave concern over the continuation and escalation of an attempt to change the status quo by force” and agreed on the importance of observing a rules-based maritime order and respect for international maritime laws, Japan’s Foreign Ministry said in a statement.

“Together we will maintain and strengthen a free and open maritime order,” Kishi said at a joint news conference after the talks. He said the two countries will speed up a decision on the details of Japanese exports of defense equipment to Indonesia.

The security talks come two weeks after Japan and its key ally, the United States, held security talks in which they condemned Chinese “coercion and aggression” toward its neighbors in Asia.

The Japanese and Indonesian ministers also shared “serious concern” over the killings of pro-democracy protestors by the Myanmar military, agreeing to closely cooperate in efforts to improve the situation in that country.