Japanese PM Shinzo Abe has been heckled at a ceremony marking the 70th anniversary of the Battle of Okinawa.
Mr Abe was shouted at by locals, angry about the size of the US military presence on their island.
Mr Abe and US officials were among thousands who gathered to remember some 250,000 people who died in the only land battle in Japan in World War Two.
More than 100,000 were civilians, and residents are resentful that they must continue to host US troops.
About 100,000 Japanese soldiers died over a period of three months in a bloody battle with Allied forces. More than 100,000 Okinawans also died, with many ordered to take their own lives by Japanese military commanders.
More than 12,000 US troops also died on the island, about 340 miles (550 km) south-west from mainland Japan.
The prime minister being jeered is something that almost never happens in Japan, but to this day there is deep bitterness at the sacrifice of so many Okinawan lives, says the BBC's Rupert Wingfield-Hayes in Tokyo.
Many Okinawans accuse Tokyo and Washington of continuing to treat the island like an imperial possession, ignoring the wishes of the islanders to have US military bases removed, our correspondent says.
In 1945, the strategic island was seen by the Allies as a launchpad for an invasion of Japan.
The assault never came as Tokyo surrendered following the atomic bombs dropped on Hiroshima and Nagasaki in August 1945.
Okinawa remained occupied by the US military until 1972, when Tokyo regained control of the island.
However, Japan's southernmost prefecture is still home to about 26,000 US troops and several bases which occupy a fifth of the island.
A controversial project to move a US air base from an urban area to the coast has recently triggered a stand-off between the central authorities in Tokyo and Okinawa's officials.