TOKYO (Reuters) - Japan on Thursday protested to China after a Chinese military vessel was detected in waters near disputed islands in the East China Sea, calling on China to avoid actions that could interfere with improving bilateral ties.

FILE PHOTO: Japan's Chief Cabinet Secretary Yoshihide Suga attends a news conference at Prime Minister Shinzo Abe's official residence in Tokyo, Japan May 29, 2017. REUTERS/Toru Hanai/File Photo

The Chinese frigate was seen in waters contiguous to Japan’s territory around the islands, known as the Senkaku in Japan and Diaoyu in China, the Defence Ministry said. It did not enter Japanese territorial waters.

A foreign submarine was also detected in the same area on Wednesday as well as on Thursday, it added, without identifying the nationality. Both had left the area by Thursday afternoon.

Japan and China have long been at loggerheads over the tiny, uninhabited islands. They are controlled by Japan but claimed also by China.

“We want to strongly urge China not to do anything to interfere with improving bilateral ties,” Chief Cabinet Secretary Yoshihide Suga told a news conference.

Kenji Kanasugi, director-general of the Japanese Foreign Ministry’s Asian and Oceanian Affairs Bureau, met with Chinese ambassador Cheng Yonghua at the Foreign Ministry to express grave concern about the move, the ministry said in a statement.

The Chinese ambassador responded to the protest by reiterating China’s stance on the islands, the statement added.

China routinely rejects Japanese criticism of such patrols, saying its ships have every right to operate in what China calls its territorial waters.

China’s defense ministry said in an online statement that a Chinese missile frigate had responded to two Japanese ships entering its claimed waters but that the ships had now left.

China firmly opposes and is strongly dissatisfied with Japan’s actions, which had hyped up China’s actions and “mixed up right and wrong”, the statement said.