Updated

Japan's navy went on alert Wednesday when an unidentified submarine made a brief incursion into the country's southern waters near Okinawa (search).

The submarine left Japanese waters shortly after it was spotted and a reconnaissance aircraft and destroyer were monitoring its movements, Chief Cabinet Secretary Hiroyuki Hosoda said. Tokyo also was trying to determine where the vessel came from.

If the submarine's origin is identified, Japan will take "necessary steps," Hosoda said, without elaborating.

Japan's public broadcaster NHK said defense officials were investigating a possible link between the sub sighting and Chinese military vessels detected recently in Japan's southern waters.

"It's regrettable," Prime Minister Junichiro Koizumi (search) told reporters. "It's certainly not a good thing that a submarine of unknown national origin enters our territorial waters."

Kyodo News quoted unidentified defense officials as saying that the vessel may be a Chinese nuclear submarine.

Hosoda said it was too early to comment on those reports.

"We have yet to reach the stage where we can make a definite conclusion," he said.

A P3C reconnaissance plane confirmed that the submarine had entered Japanese territorial waters near the Sakishima islands in southern Okinawa prefecture (state), Hosoda said.

After exiting Japanese territory, the aircraft followed the submarine as it cruised international waters on an indeterminate route that did not appear to be straight, Hosoda said.

Defense chief Yoshinori Ono "issued a maritime alert order" and an emergency task force was set up at the prime minister's office, Hosoda said.

The alert order allows the military to inspect ships and force ships to stop or change course. It also allows the military to use weapons in self-defense.

If the submarine tries to re-enter Japanese waters, Japan's Maritime Self-Defense Forces can order it to surface and identify itself, Hosoda said.

Defense officials confirmed that two Chinese military vessels — a submarine rescue vessel and a towing vessel — were spotted between Friday and Monday in waters 200 miles southeast of Japan's Tanegashima island.

Officials, however, refused to comment on a possible link between the two incidents.

Japan has been considering ways to boost its maritime defenses after a gunbattle with a suspected North Korean spy ship in December 2001.

In that incident, Japanese Coast Guard patrol boats sank the suspected spy ship off southwestern Japan. The patrol vessels returned fire only after the ship, ordered to stop, opened fire with a rocket and guns.

Territorial disputes have occasionally flared up between Japan and its neighbors, China and South Korea, including one that has deepened in recent months with Beijing due to competing claims over natural gas deposits in the East China Sea.

Top ruling party official Shinzo Abe called the infiltration a "very serious matter" and urged the military to use its abilities to determine where the submarine was from.

The Sakishima islands (search) lie in waters between the northeastern tip of Taiwan and Okinawa's main island — some 1,000 miles south of Tokyo.