A man thought to be a right-wing activist has shot and killed himself in front of the Japanese parliament.
Japan's neighbours say the shrine glorifies the country's military past
Police said he was carrying a letter addressed to Japanese PM Yasuo Fukuda, mentioning the Yasukuni shrine.
The shrine honours the country's war dead, but it is the cause of friction with Japan's neighbours because some of those honoured are war criminals.
Shootings are extremely rare in Japan, a country where it is difficult to get hold of a gun.
The man, who was in his late 50s, arrived at the parliament building in Tokyo in a taxi, during the morning rush hour.
He got out and shot himself in the head with a handgun.
He was later confirmed dead at a nearby hospital, police said.
The man was holding two letters, according to police. One urged Prime Minister Yasuo Fukuda to take a firm line on foreign policy and the issue of the Yasukuni shrine.
The other letter was addressed to the media, calling on journalists to promote visits to the controversial shrine.
Yasukuni honours soldiers who have died in the service of the emperor, including 14 people convicted as Class A war criminals after World War II.
Japan's neighbours believe it is a place that glorifies militarism.
The annual visits to the shrine by former Prime Minister Junichiro Koizumi, damaged relations with China and South Korea.
Mr Fukuda has said he will not go there while in office.
Japan's right-wing activists are a small but vocal minority. On occasions they have shot at and killed left-leaning politicians.