Japan's Defense Ministry says a foreign submarine was sailing underwater in the contiguous zone just outside territorial waters in Okinawa Prefecture on Wednesday and Thursday.
Ministry officials say the submarine apparently belongs to the Chinese Navy, as a Chinese frigate was spotted nearby.
The officials say a Maritime Self-Defense Force vessel on Wednesday afternoon spotted a submarine sailing underwater off Miyako Island in the southern prefecture.
They say the submarine continued to move northwest and left the contiguous zone into the East China Sea without resurfacing.
The officials say the submarine again entered Japan's contiguous zone on Thursday morning off Taisho Island of the Senkaku Islands.
International law requires submarines to surface and hoist the national flag when navigating through territorial waters of other nations, but not in contiguous zones.
Also off Taisho Island, a Chinese Navy frigate reportedly entered the contiguous zone twice on Thursday.
The officials say neither vessel entered Japanese territorial waters. They say both left the contiguous zone on Thursday afternoon.
The ministry is closely monitoring the submarine's move and collecting information.
Vice Foreign Minister Shinsuke Sugiyama summoned Chinese Ambassador Cheng Yonghua to lodge a protest on Thursday.
Sugiyama expressed grave concern and stressed that China should not stem the tide for improving Japan-China relations.
Japan controls the Senkaku Islands. The Japanese government maintains that the islands are an inherent part of Japan's territory. China and Taiwan claim them.
Ministry officials say Cheng rebuffed Japan's protest, saying the islands are part of China's territory.
After the meeting, the ambassador left the ministry without responding to reporters' questions.