Prime Minister Shinzo Abe and visiting German President Joachim Gauck have agreed to work together to maintain the international rule of law, apparently reflecting shared concerns over China's expansionary activities.

Gauck told a joint news conference after meeting Abe on Monday that he is "watching with concern" the situation in the East and South China seas. The leaders affirmed that they will not accept attempts to change the status quo by force.

Japan has repeatedly expressed concern about Chinese vessels operating near the Senkaku Islands in the East China Sea.

"We affirmed that Japan and Germany will work in concert to make a proactive contribution to peace and stability in the international community," Abe told the news conference.

While Gauck is Germany's head of state, Chancellor Angela Merkel is responsible for most political decision-making.

Gauck is visiting Japan for the first time since taking office in 2012. He is scheduled to visit Kyoto on Wednesday and Thursday before going to Nagasaki Friday to visit a memorial for the people killed in the 1945 atomic bombing and to meet survivors of the bombing and local officials.