Japanese Prime Minister Junichiro Koizumi said on Wednesday that he would continue to visit a controversial religious shrine even though a court ruled his visits illegal.

The Yasukuni religious shrine honours Japan's 2.5 million war dead.

But it also includes a number of people found guilty of war crimes, including Hideki Tojo, the prime minister of Japan during the Second World War. He was hanged by the Americans.

Junichiro Koizumi visits the Yasukuni religious shrine. (AP file photo)
Junichiro Koizumi visits the Yasukuni religious shrine. (AP file photo)

A Fukuoka court ruled that Koizumi's visits violated Japan's constitutional separation of state and religion. A group of 211 relatives of war dead and members of religious groups had filed the lawsuit over Koizumi's first visit to the shrine in August 2001.

The Fukuoka judge denied the plaintiffs $200,000 in compensation they sought for "psychological damage."

Koizumi said he found the ruling "strange," adding he would go again to Yasukuni.

"I don't know why it violates the constitution. I go there as prime minister and as an individual," Koizumi said.

He has made four visits since winning office in 2001, with the last coming in January 2004.

The Fukuoka case is the latest in a series of legal challenges to the pilgrimages, which have continued even after a 1991 ruling against the visits was upheld by Japan's supreme court.

The government has argued that Koizumi's visits were as a private citizen, thereby not breaching the constitution. The government has not said whether it will appeal the Fukuoka decision.

China and South Korea, both victims of Japanese aggressions and war crimes during the Second World War, have repeatedly complained about Koizumi's pilgrimages.

Critics argue that the pilgrimages symbolize Japan's failure to atone for its militaristic past. Supporters contend that Japan's prime minister should be allowed to honour the nation's war dead as other countries' leaders do.

The Japanese themselves are divided about the shrine visits, which have become a tradition among premiers attempting to appeal to the conservative wing of Japan's ruling party.