Japan's nationalist Prime Minister Shinzo Abe paid tribute at Tokyo's controversial Yasukuni war shrine on Thursday, in a move Beijing condemned as "absolutely unacceptable".
Abe described his visit, which is certain to roil already-troubled ties in East Asia, as a pledge against war and said it was not aimed at hurting feelings in China or South Korea.
The shrine is the believed repository of around 2.5 million souls of Japan's war dead, most of them common soldiers, but also including several high-level officials executed for war crimes after World War II, who were enshrined in the 1970s.
South Korea and China see it as a symbol of Tokyo's unrepentance and say it represents a misguided view of its warmongering past.
"I chose this day to report (to enshrined spirits) what we have done in the year since the administration launched and to pledge and determine that never again will people suffer in war," Abe, dressed in a a formal black swallow-tailed coat and a silver tie, told reporters.
"I am aware that, because of misunderstandings, some people criticise a visit to Yasukuni shrine as an act of worshipping war criminals, but I made my visit to pledge to create an era where people will never suffer from catastrophe in war," Abe said.
"I have no intention at all to hurt the feelings of Chinese or South Korean people."
"Like many prime ministers who have visited Yasukuni after the war, I wish to continue friendly relations with China and South Korea, which are important and benefit national interests," he said.
The visit came exactly 12 months after he took power, a period in which he has met neither China's President Xi Jinping or Korea's President Park Geun-Hye.
Ties with Beijing were bad before Abe took office, with the two countries crossing diplomatic swords over the ownership of a string of uninhabited islands in the East China Sea, controlled by Japan, but claimed by China.
The dispute has been ratcheted up further this year, with the involvement of military aircraft and ships, leaving some observers warning of the danger of armed conflict between the world's second- and third-largest economies.
Foreign Minister Fumio Kishida told reporters the government hoped Abe's visit would not further affect ties.
"I understand that a politician's visit or a minister's visit to the shrine is a matter of his or her personal belief," he told reporters.
"Regardless, I believe we must avoid letting an affair as such develop into a political or diplomatic issue."
The last incumbent Japanese prime minister to visit the shrine was Junichiro Koizumi on August 15, 2006, the anniversary of Japan's defeat in 1945.
His repeated pilgrimages badly soured relations with China, despite the important economic and trade ties that bind the two countries.
Several members of Abe's cabinet have been to the shrine over the last year, and have previously claimed they were doing so in a personal capacity.
However, China and South Korea, both victims of Japan's 20th century aggression, say no such distinction exists.
Abe did not visit the shrine during his first term as prime minister from 2006 to 2007, although later said that he felt "extremely remorseful" for that.
Takehiko Yamamoto, a professor of international relations at Tokyo's Waseda University, said the visit was "an act of folly" that was certain to make a bad situation worse.
"It is perfectly possible his visit will fuel worries in Washington over a possible rise of militarism and a shift to the right in Japan," he said.
During a visit to the United States in May, Abe told Foreign Affairs magazine that the shrine, seen throughout East Asia as a symbol of Japan's militarism, was a tribute to those "who lost their lives in the service of their country" and compared it with the US national cemetery at Arlington.
"I think it's quite natural for a Japanese leader to offer prayer for those who sacrificed their lives for their country, and I think this is no different from what other world leaders do," he said.
Unlike Arlington, Yasukuni's caretakers promote a view of history that is controversial even at home, with the accompanying Yushukan museum staunchly defending much of Japan's wartime record.