Prime Minister Junichiro Koizumi prayed on Tuesday at a shrine honouring war dead and war criminals on the emotionally charged anniversary of Japan's World War II defeat, defying anger from neighbouring countries.
Koizumi, who steps down next month, became the first prime minister in 21 years to visit the Yasukuni shrine on August 15, when veterans and nationalists congregate at the site associated with Japan's militarist past.
Under light rain that intensified as he arrived, Koizumi, wearing a tuxedo jacket with coattails and a tie, prayed for 10 minutes inside the shrine in central Tokyo, escorted by a Shinto priest in a white and yellow robe.
The Yasukuni war shrine honours war dead and war criminals and was a spiritual pillar during World War II, when kamikaze suicide pilots would tell one another, "See you at Yasukuni".
Koizumi, who steps down next month, has visited the shrine once a year since taking office in 2001, each time infuriating China and South Korea which remain bitter over Japanese imperialism.
But he has never visited on August 15, the date when Emperor Hirohito surrendered in 1945.
China immediately lodged a strong protest over his pilgrimage, with the foreign ministry saying the visit "challenges international justice and tramples the conscience of mankind".
Several thousand people, including several dozen right-wing activists in military fatigues, waved Japanese flags as Koizumi visited the shrine.
"Mr Koizumi, thank you!" supporters shouted as he left.
Hundreds of police kept a close eye on Koizumi, as 15 helicopters flew overhead.