Yasukuni Shrine - the name means 'peaceful country' - was founded in 1869 on the orders of Emperor Meiji.
The shrine venerates the souls of Japan's war dead
It is dedicated to the souls of about 2.5 million Japanese men, women and children who died in the name of their country since that time.
They include soldiers, war-time nurses, students who entered into battle, and those who committed suicide in shame at the end of World War II.
At the centre of the shrine's controversy is the fact that those venerated include 14 convicted class A war criminals, including Prime Minister General Hideki Tojo.
Within the shrine, the souls of the dead are worshipped rather than just remembered.
According to Japan's national Shinto religion, humans are transformed into "kami" or deities when they die, and as such are worshipped by their descendants. The kami of remarkable people are enshrined.
Surrounded by war banners and military regalia, the Yasukuni kami are venerated by hundreds of thousands of visitors who attend the shrine each year.
Compared with most Shinto shrines, which were founded hundreds of years ago, the dedication of the Yasukuni shrine was a relatively recent affair.
Analysts say that because the main wars it commemorates are those with China and the US, it appears to the political left to symbolise foreign invasions.
To the right, it is a symbol of patriotism.
The shrine is frequently at the centre of political storms. There have been several parliamentary debates aimed at removing General Tojo's kami, but these have been blocked every time by nationalists.
The debate intensifies in the lead up to 15 August - the anniversary of Japan's surrender in World War II.
Several cabinet ministers pay their respects at the shrine each year, but only one Prime Minister, Yasuhiro Nakasone in 1985, has made an official visit since the war.
Former Prime Minister Ryutaro Hashimoto made what he said was a private visit, on his birthday in July 1996.
Mr Koizumi has visited the shrine six times as prime minister
Current Prime Minister Junichiro Koizumi has made six visits to Yasukuni since he took office in 2001. Arguments have ensued over whether these were made in a private or official capacity, although Mr Koizumi has denied such a distinction can exist for a country's leader.
"I'm both a public and private person," he has said.
Mr Koizumi has repeatedly argued that his visits are to pray for peace and that Japan should never go to war again.
But the visits have angered Japan's Asian neighbours, especially China and Korea, who were victims of the country's military aggression in the first half of the 20th century.