Facing strong protests, China broke a week-long silence Tuesday and offered Japan its first explanation about a submarine that the Japanese said breached their territorial waters without signaling its identity.

The incursion, by what Japanese officials identified as a Chinese Han-class nuclear vessel, outraged the Japanese public and led Prime Minister Junichiro Koizumi's government to lodge a diplomatic protest and demand an official apology. It sent temperatures rising in a relationship made delicate by the history of Japanese occupation of China and more complex as Chinese power expands and Japan reassesses its regional role.

The Foreign Ministry did not admit publicly that the submarine was Chinese or acknowledge that it had penetrated Japanese waters. Brushing off questions, a ministry spokeswoman, Zhang Qiyue, said only that Vice Foreign Minister Wu Dawei had briefed Japan's ambassador in Beijing, Koreshige Anami. "This problem has been properly addressed," Zhang said.

But the Japanese government spokesman, Hiroyuki Hosoda, said in Tokyo that Koreshige was called in on Tuesday and told that technical problems caused the submarine to veer accidentally into Japanese territorial waters on Nov. 10 and that the Chinese government regretted the mistake.

"We consider this to be an apology," Hosoda said, according to news agencies reporting from Tokyo.

The delay in China's response may have been due in part to President Hu Jintao's absence from Beijing for his first test as commander of the armed forces, according to Chinese and foreign analysts. Hu, who recently added military chief to his positions as president and Communist Party head, was visiting Brazil on his way to an Asia-Pacific Economic Cooperation summit meeting in Chile.

The Chinese military, particularly its strategic submarine service, operates with autonomy from lower-ranking civilian authority, the analysts noted. Given the potential for embarrassment or trouble with Japan, decisions on what to do about the submarine detected in Japanese waters likely would have come from the top, they said, meaning Hu's traveling office.

The vessel was detected by Japanese submarine-hunting patrols not far south of Okinawa, a Japanese island 1,000 miles south of Tokyo where there are extensive U.S. military facilities. Although the vessel spent only a few hours in Japanese waters, the Japanese navy mobilized and gave chase for two days as the sub headed back toward China, still without identifying itself, officials in Tokyo said.

It was operating in waters near where Chinese vessels earlier this year began exploring for gas deposits along the median line of overlapping exclusive economic zones claimed by both countries. In response to Japanese demands, the Chinese and Japanese governments last month held a round of talks over the Chinese exploration, after which Japanese officials complained they had been stonewalled.

The Japanese trade minister, Shoichi Nakagawa, told reporters in Tokyo last week that the submarine incident could intensify Japan's doubts about the gas exploration and China's intentions in the disputed economic zones.

The Diaoyu Islands, which Japan controls under the name Senkaku, also lie nearby, about 180 miles southwest of Okinawa. Both nations claim the small chain of dots on the map, where petroleum deposits have been detected, and Chinese nationalists have occasionally sailed out to stake a claim, only to be ejected by Japanese police.

Sachiko Sakamaki in Tokyo contributed to this report.