An aerial photo shows a Chinese marine surveillance ship Haijian No. 66 (C) cruising next to Japan Coast Guard patrol ships in the East China Sea, near known as Senkaku isles in Japan and Diaoyu islands in China, in this photo taken by Kyodo April 23, 2013. REUTERS/Kyodo

BEIJING (Reuters) – China said on Wednesday that “provocative actions” would not sway it from defending its territory, after Japan confirmed it would conduct military drills with the United Statesamid tension between Beijing and Tokyo over disputed islands.

Japan said on Tuesday that the joint drill, scheduled for June off California, involved the recapture of an isolated island but was not aimed at scenarios involving a specific country, Japan’s Kyodo news agency reported.

China’s Foreign Ministry spokeswoman, Hua Chunying, said “foreign pressure” could not sway China from protecting its territorial sovereignty in the East China Sea.

“For any related provocative actions, the Chinese government will maintain a resolute response,” Hua told reporters at a regular news briefing when asked about the drills.

“We have always upheld the same stance on issues related to the Diaoyu Islands: to appropriately solve, manage and control the relevant issues through bilateral dialogue and negotiations.”

Beijing and Tokyo have both protested over an incident on Tuesday in which Chinese patrol vessels played cat-and-mouse with a flotilla of Japanese nationalists near the uninhabited islands, known as the Senkaku in Japan and the Diaoyu in China.

The Japanese government bought the islands near rich fishing grounds and potentially lucrative maritime gas fields from a private Japanese owner last year, sparking sometimes-violent anti-Japanese protests across China.

The issue has brought Chinese-Japanese relations to their lowest point since normalization of relations more than 40 years ago.

China also chastised Japan for Tuesday’s visits by at least 168 lawmakers to Tokyo’s Yasukuni Shrine, which honors 14 leaders convicted as war criminals by an Allied tribunal along with Japan’s war dead.

The pilgrimage came after Prime Minister Shinzo Abe made an offering and Deputy Prime Minister Taro Aso and two other ministers visited Yasukuni over the weekend.

Homage paid by leading Japanese politicians at the Tokyo shrine typically angers Japan’s neighbors, who contend that it glorifies wartime aggression.

U.S. Chairman of the Joint Chiefs of Staff Gen. Martin Dempsey told reporters in Beijing on Wednesday on the last day of his trip to China that he had reminded Chinese officials of U.S. obligations to Japan.

“Our position is that we don’t take a position on territorial issues. In the case of Japan in particular, however, I was careful to remind them that we do have certain treaty obligations with Japan that we would honor,” he said.

The U.S.-Japan security treaty commits the United States to intervene in defense of Japan if there is an attack on Japanese-administered territory.