China and South Korea have condemned Japanese Prime Minister Shinzo Abe for visiting a shrine that honours war dead including convicted war criminals.
Seoul said it was furious with the "deplorable" act, and Beijing labelled the visit "absolutely unacceptable" and summoned Japan's ambassador.
Japan's neighbours see the Yasukuni shrine as a symbol of the militarism of Japan during and before World War Two.
US officials said the visit would "exacerbate tensions" in the region.
China, Japan and South Korea are embroiled in a number of disputes over territory in the East China Sea.
The disputes have helped to fuel nationalist passions in all three countries.
Mr Abe's Yasukuni visit, the first by a serving prime minister since Junichiro Koizumi went in 2006, was televised live.
"It is not my intention at all to hurt the feelings of the Chinese and Korean people," said Mr Abe, who claimed his visit was an anti-war gesture.
Officials said Mr Abe visited the shrine in a private capacity and was not representing the government.
But shortly after, China summoned Japan's Beijing envoy to lodge a "strong protest".
Chinese Foreign Ministry spokesman Qin Gang said Beijing seriously condemned the visit.
"This poses a major political obstacle in the improvement of bilateral relations. Japan must take responsibility for all the consequences that this creates," he said.
China's angry reaction was mirrored by South Korea and Taiwan, whose Foreign Minister David Lin called for Tokyo to engage in self-reflection and avoid hurting the feelings of its neighbours.
In the early part of the 20th Century Japan transformed itself into a militarist state under emperors who were worshipped as gods.
Japan occupied Taiwan, the Korean peninsula and much of China.
During World War Two Japanese imperial forces committed atrocities throughout East and South East Asia, including the use of Korean women as sex slaves and carrying out massacres in China.
Those countries have frequently complained that Japan has not done enough to atone for its crimes and tries to whitewash history.
Class-A war criminals
Yasukuni was established in the mid-19th Century to remember the men, women and children who have died in war
The shrine contains the remains of some of those commemorated, but is mostly a symbolic destination for relatives to pay respects.
It now commemorates some 2.5 million people, many of whom are civilians.
But hundreds of convicted WW2 criminals are also enshrined there.
Fourteen so-called Class A criminals - those who were involved in planning the war - are among those honoured. They include war-time leader General Hideki Tojo, who was executed for war crimes in 1948.